/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * articulos_sie_invefisicodetalle.java
 *
 * Created on 24/04/2011, 11:06:38 AM
 */

package sie_invdis;


import java.awt.print.PrinterException;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import java.awt.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Calendar;

import java.text.ParseException;
import java.text.*;
import java.io.*;
/**
 *
 * @author Michelle
 */
public class articulos_sie_invefisicodetalle extends javax.swing.JFrame {


    private javax.swing.table.DefaultTableModel jtable_modelo;
    private javax.swing.table.DefaultTableModel jtable_modelo_catalogo;
     private javax.swing.table.DefaultTableModel jtable_modelo_diferencias;
     private javax.swing.table.DefaultTableModel jtable_modelo_subfam;
     private javax.swing.table.DefaultTableModel jtable_modelo_familia;
     private javax.swing.table.DefaultTableModel jtable_modelo_familiaeninve;
     private javax.swing.table.DefaultTableModel jtable_modelo_subfameninve;
     private javax.swing.table.DefaultTableModel jtable_modelo_Articeninve;
     private javax.swing.table.DefaultTableModel jtable_modelo_Artihistorifisico;
     private javax.swing.table.DefaultTableModel jtable_modelo_faltante;
     private javax.swing.table.DefaultTableModel jtable_modelo_sobrante;
     private javax.swing.table.DefaultTableModel jtable_modelo_subfam2;
     private javax.swing.table.DefaultTableModel jtable_modelo_subfamhis;
     private javax.swing.table.DefaultTableModel jtable_modelo2;
     private javax.swing.table.DefaultTableModel jtable_modelo_kardex;
     private javax.swing.table.DefaultTableModel jtable_modelo_estadistica;

      private JTable jtable_tiendas=variables_global.gettabla_tiendas();

    private bd_conexion x = new bd_conexion() ;
       //se creaa la variable resultset
      private ResultSet rs = null;
      int controlcombo=0,ffoliopadre=0,ftienda=0,ffoliohijo=0,indexactual=0,yacargue2=0,yacargue1=0,opcionfys=1,yacargue3=0;
      private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");
      private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");
      String tien="";
      private java.util.Date fechahoy=new Date();
    /** Creates new form articulos_sie_invefisicodetalle */
    public articulos_sie_invefisicodetalle() {
        
        initComponents();
    }
public articulos_sie_invefisicodetalle(int folioinvepadre,int tie,int folioinvehijo,String tienda) {
        
        this.iniciar_modelo_de_tabla();
        this.iniciar_modelo_catalogo();
        this.iniciar_modelo_diferencias();
        this.iniciar_modelo_subfam();
        this.iniciar_modelo_familia();
        this.iniciar_modelo_familiaeninventario();
        this.iniciar_modelo_subfameninve();
        this.iniciar_modelo_articuloseninve();
        this.iniciar_modelo_articulofisicohistorial();
        this.iniciar_modelo_de_faltante();
        this.iniciar_modelo_de_sobrante();
        this.iniciar_modelo_subfam2();
        this.iniciar_modelo_subfamhisto();
        this.iniciar_modelo_de_tabla2();
        this.iniciar_modelo_kardex();
        this.iniciar_modelo_estadistica();
        initComponents();
        this.jtf_idinve.setText(String.valueOf(folioinvepadre));
        this.jtf_tienda.setText(String.valueOf(tie));
        ffoliopadre=folioinvepadre;
        ftienda=tie;
        ffoliohijo=folioinvehijo;
        this.carga_datos_catalogo(ftienda, ffoliopadre,0,"");
        this.jbtn_autorizarinventario.setVisible(false);
        this.jbtn_agregarainvecongelado.setVisible(false);
        this.jbtn_congelarexistencias.setVisible(false);
        this.jbtn_reporte.setVisible(false);
        if (variables_global.getnivelusu()<3)
                    {
                        this.jbtn_reporte.setVisible(true);
                        this.jbtn_genramovextsal.setVisible(true);
                        this.jbtn_genramovextsal1.setVisible(true);
                    }
        else
                    {
                        this.jbtn_reporte.setVisible(false);
                        this.jbtn_genramovextsal.setVisible(false);
                        this.jbtn_genramovextsal1.setVisible(false);
                        this.jPanel11.setVisible(false);
                        this.jPanel9.setVisible(false);
                        this.jPanel16.setVisible(false);
                        this.jbtn_reporte.setVisible(false);
                        this.jbtn_congelarexistencias.setVisible(false);
                        this.jPanel21.setVisible(false);
                        this.jbtn_invepadreactualizar.setVisible(false);
                    }


       jt_inventariofisicodetalle.getColumnModel().getColumn(0).setPreferredWidth(30);//tem ent
       jt_inventariofisicodetalle.getColumnModel().getColumn(1).setPreferredWidth(80);//tem ent
       jt_inventariofisicodetalle.getColumnModel().getColumn(2).setPreferredWidth(150);//tem ent
       jt_inventariofisicodetalle.getColumnModel().getColumn(3).setPreferredWidth(40);//tem ent
       jt_inventariofisicodetalle.getColumnModel().getColumn(4).setPreferredWidth(50);//tem ent
       jt_inventariofisicodetalle.getColumnModel().getColumn(5).setPreferredWidth(80);//tem ent
       jt_inventariofisicodetalle.getColumnModel().getColumn(6).setPreferredWidth(60);//tem ent

       jt_catainventarios.getColumnModel().getColumn(0).setPreferredWidth(80);//tem ent
       jt_catainventarios.getColumnModel().getColumn(1).setPreferredWidth(150);//tem ent
       jt_catainventarios.getColumnModel().getColumn(2).setPreferredWidth(60);//tem ent
       jt_catainventarios.getColumnModel().getColumn(3).setPreferredWidth(60);//tem ent
       jt_catainventarios.getColumnModel().getColumn(4).setPreferredWidth(95);//tem ent
       jt_catainventarios.getColumnModel().getColumn(5).setPreferredWidth(95);//tem ent
       jt_catainventarios.getColumnModel().getColumn(6).setPreferredWidth(60);//tem ent
       jt_catainventarios.getColumnModel().getColumn(7).setPreferredWidth(60);//tem ent
       jt_catainventarios.getColumnModel().getColumn(8).setPreferredWidth(60);//tem ent

       jtb_catalogo_articulos.getColumnModel().getColumn(0).setPreferredWidth(60);//tem ent
       jtb_catalogo_articulos.getColumnModel().getColumn(1).setPreferredWidth(100);//fam.
       jtb_catalogo_articulos.getColumnModel().getColumn(2).setPreferredWidth(65);//clave
       jtb_catalogo_articulos.getColumnModel().getColumn(3).setPreferredWidth(160);//descrip.
       jtb_catalogo_articulos.getColumnModel().getColumn(4).setPreferredWidth(50);//item
       jtb_catalogo_articulos.getColumnModel().getColumn(5).setPreferredWidth(15);//precio
       jtb_catalogo_articulos.getColumnModel().getColumn(6).setPreferredWidth(15);//f.ult. compra
       jtb_catalogo_articulos.getColumnModel().getColumn(7).setPreferredWidth(15);//Observaciones
       jtb_catalogo_articulos.getColumnModel().getColumn(8).setPreferredWidth(15);//Observaciones
       jtb_catalogo_articulos.getColumnModel().getColumn(9).setPreferredWidth(15);//Observaciones
       jtb_catalogo_articulos.getTableHeader().setBackground(Color.yellow);

       
       jt_repsubfam.getColumnModel().getColumn(0).setPreferredWidth(120);//familia
       jt_repsubfam.getColumnModel().getColumn(1).setPreferredWidth(60);//subfam.
       jt_repsubfam.getColumnModel().getColumn(2).setPreferredWidth(60);//id
       jt_repsubfam.getColumnModel().getColumn(3).setPreferredWidth(60);//clave
       jt_repsubfam.getColumnModel().getColumn(4).setPreferredWidth(60);//descrip.
       jt_repsubfam.getColumnModel().getColumn(5).setPreferredWidth(60);//descrip.
       jt_repsubfam.getTableHeader().setBackground(Color.yellow);

       jt_repfamilia.getColumnModel().getColumn(0).setPreferredWidth(120);//familia
       jt_repfamilia.getColumnModel().getColumn(1).setPreferredWidth(60);//subfam.
       jt_repfamilia.getColumnModel().getColumn(2).setPreferredWidth(60);//id
       jt_repfamilia.getColumnModel().getColumn(3).setPreferredWidth(60);//clave
       jt_repfamilia.getColumnModel().getColumn(4).setPreferredWidth(60);//descrip.
       jt_repfamilia.getColumnModel().getColumn(5).setPreferredWidth(60);//descrip.
       jt_repfamilia.getTableHeader().setBackground(Color.yellow);

       jt_eninvefamilia.getColumnModel().getColumn(0).setPreferredWidth(40);//familia
       jt_eninvefamilia.getColumnModel().getColumn(1).setPreferredWidth(120);//subfam.

       jt_eninvesfamilia.getColumnModel().getColumn(0).setPreferredWidth(40);//familia
       jt_eninvesfamilia.getColumnModel().getColumn(1).setPreferredWidth(120);//subfam.

       jtb_catalogo_historialfisico.getColumnModel().getColumn(0).setPreferredWidth(30);//familia
       jtb_catalogo_historialfisico.getColumnModel().getColumn(1).setPreferredWidth(120);//subfam.
       jtb_catalogo_historialfisico.getColumnModel().getColumn(2).setPreferredWidth(70);//id
       jtb_catalogo_historialfisico.getColumnModel().getColumn(3).setPreferredWidth(80);//descrip.
       jtb_catalogo_historialfisico.getColumnModel().getColumn(4).setPreferredWidth(80);//descrip.
       jtb_catalogo_historialfisico.getColumnModel().getColumn(5).setPreferredWidth(65);//clave
       jtb_catalogo_historialfisico.getColumnModel().getColumn(6).setPreferredWidth(160);//descrip.
       jtb_catalogo_historialfisico.getColumnModel().getColumn(7).setPreferredWidth(20);//descrip.



       jtb_catalogo_historialfisico.getTableHeader().setBackground(Color.yellow);



        jtb_catalogo_articulos1.getColumnModel().getColumn(0).setPreferredWidth(50);//clave
        jtb_catalogo_articulos1.getColumnModel().getColumn(1).setPreferredWidth(80);//descrip.
        jtb_catalogo_articulos1.getColumnModel().getColumn(2).setPreferredWidth(45);//item
        jtb_catalogo_articulos1.getColumnModel().getColumn(3).setPreferredWidth(25);//precio
        jtb_catalogo_articulos1.getColumnModel().getColumn(4).setPreferredWidth(25);//f.ult. compra
        jtb_catalogo_articulos1.getColumnModel().getColumn(5).setPreferredWidth(25);//Observaciones
        jtb_catalogo_articulos1.getColumnModel().getColumn(6).setPreferredWidth(15);//Observaciones
        jtb_catalogo_articulos1.getColumnModel().getColumn(7).setPreferredWidth(15);//Observaciones

        jtb_catalogo_articulos1.getTableHeader().setBackground(Color.yellow);
        //this.carga_datos_reportediferencias(idtienda,idinve,0,"");

        jt_repsubfam1.getColumnModel().getColumn(0).setPreferredWidth(30);//tem ent
        jt_repsubfam1.getColumnModel().getColumn(1).setPreferredWidth(120);//familia
        jt_repsubfam1.getColumnModel().getColumn(2).setPreferredWidth(60);//subfam.
        jt_repsubfam1.getColumnModel().getColumn(3).setPreferredWidth(60);//id
        jt_repsubfam1.getColumnModel().getColumn(4).setPreferredWidth(60);//clave
        jt_repsubfam1.getColumnModel().getColumn(5).setPreferredWidth(60);//descrip.
        jt_repsubfam1.getTableHeader().setBackground(Color.yellow);



        jt_repsubfamhistorial.getColumnModel().getColumn(0).setPreferredWidth(30);//tem ent
        jt_repsubfamhistorial.getColumnModel().getColumn(1).setPreferredWidth(120);//familia
        jt_repsubfamhistorial.getColumnModel().getColumn(2).setPreferredWidth(60);//subfam.
        jt_repsubfamhistorial.getColumnModel().getColumn(3).setPreferredWidth(60);//id
        jt_repsubfamhistorial.getColumnModel().getColumn(4).setPreferredWidth(60);//clave
        jt_repsubfamhistorial.getColumnModel().getColumn(5).setPreferredWidth(60);//descrip.
        jt_repsubfamhistorial.getColumnModel().getColumn(6).setPreferredWidth(60);//descrip.
        jt_repsubfamhistorial.getColumnModel().getColumn(7).setPreferredWidth(60);//descrip.
        jt_repsubfamhistorial.getTableHeader().setBackground(Color.yellow);




        jtbl_kardex1.getColumnModel().getColumn(0).setPreferredWidth(55);//familia
        jtbl_kardex1.getColumnModel().getColumn(1).setPreferredWidth(120);//subfam.
        jtbl_kardex1.getColumnModel().getColumn(2).setPreferredWidth(25);//familia
        jtbl_kardex1.getColumnModel().getColumn(3).setPreferredWidth(25);//subfam.
        jtbl_kardex1.getColumnModel().getColumn(4).setPreferredWidth(25);//subfam.

       //System.out.println("variable tienda:"+tie);
       this.carga_datos_invepadre(7,tie,String.valueOf(ffoliopadre));
       this.loadcom_statusinve();
       this.setLocation(5,5);
       this.jtf_descripinventario.requestFocus();

        this.buttonGroup1.setSelected(jrbtn_ambos.getModel(), true);
        this.jbtn_congelarexistencias.setVisible(false);
        this.setTitle("Tienda:"+tienda+" Detalle de Inventario Fisico");
      tien=tienda;
      this.jButton3.setVisible(false);
      this.jbtn_cancelar.setVisible(false);
      this.jbtn_cerrardocto.setVisible(false);
      this.jdc_fechainicial.setDate(fechahoy);
      this.jdc_fechafinal.setDate(fechahoy);
    }

private void iniciar_modelo_de_tabla()
{

        jtable_modelo=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo.addColumn("<html><b>id</b></html>");
        jtable_modelo.addColumn("<html><b>Clave</b></html>");
        jtable_modelo.addColumn("<html><b>Descripcion</b></html>");
        jtable_modelo.addColumn("<html><b>Precio</b></html>");
        jtable_modelo.addColumn("<html><b>C.Fisica</b></html>");
        jtable_modelo.addColumn("<html><b>Observaciones</b></html>");
        jtable_modelo.addColumn("<html><b>P.Rebaja</b></html>");

}

private void iniciar_modelo_catalogo()
    {

        jtable_modelo_catalogo=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_catalogo.addColumn("<html><b>Id/Status</b></html>");
        jtable_modelo_catalogo.addColumn("<html><b>Descripcion</b></html>");
        jtable_modelo_catalogo.addColumn("<html><b>F.Aplica</b></html>");
        jtable_modelo_catalogo.addColumn("<html><b>F.Revisa</b></html>");
        jtable_modelo_catalogo.addColumn("<html><b>Realizo</b></html>");
        jtable_modelo_catalogo.addColumn("<html><b>Confirmo</b></html>");
        jtable_modelo_catalogo.addColumn("<html><b>Piezas</b></html>");
        jtable_modelo_catalogo.addColumn("<html><b>Costo</b></html>");
        jtable_modelo_catalogo.addColumn("<html><b>P.V.Normal</b></html>");
        jtable_modelo_catalogo.addColumn("<html><b>Con P.Rebaja</b></html>");
     }

private void iniciar_modelo_diferencias()
    {

        jtable_modelo_diferencias=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_diferencias.addColumn("<html><b>id/Temp. Ent.</b></html>");
        jtable_modelo_diferencias.addColumn("<html><b>Familia</b></html>");
        jtable_modelo_diferencias.addColumn("<html><b>Clave</b></html>");
        jtable_modelo_diferencias.addColumn("<html><b>Descripcion.</b></html>");
        jtable_modelo_diferencias.addColumn("<html><b>Item.</b></html>");
        jtable_modelo_diferencias.addColumn("<html><b>Costo</b></html>");
        jtable_modelo_diferencias.addColumn("<html><b>Precio</b></html>");
        jtable_modelo_diferencias.addColumn("<html><b>Teorica</b></html>");
        jtable_modelo_diferencias.addColumn("<html><b>Fisica</b></html>");
        jtable_modelo_diferencias.addColumn("<html><b>Dif</b></html>");

    }
private void iniciar_modelo_subfam()
    {

        jtable_modelo_subfam=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_subfam.addColumn("<html><b>sub Familia</b></html>");
        jtable_modelo_subfam.addColumn("<html><b>teorica.</b></html>");
        jtable_modelo_subfam.addColumn("<html><b>fisica</b></html>");
        jtable_modelo_subfam.addColumn("<html><b>dif</b></html>");
        jtable_modelo_subfam.addColumn("<html><b>costo Fis</b></html>");
        jtable_modelo_subfam.addColumn("<html><b>costo dif.</b></html>");

    }
 private void iniciar_modelo_familia()
    {

        jtable_modelo_familia=new javax.swing.table.DefaultTableModel();//Creo el modelo
        
        jtable_modelo_familia.addColumn("<html><b>Familia</b></html>");
        jtable_modelo_familia.addColumn("<html><b>teorica.</b></html>");
        jtable_modelo_familia.addColumn("<html><b>fisica</b></html>");
        jtable_modelo_familia.addColumn("<html><b>dif</b></html>");
        jtable_modelo_familia.addColumn("<html><b>costo teo</b></html>");
        jtable_modelo_familia.addColumn("<html><b>costo Fis</b></html>");
        jtable_modelo_familia.addColumn("<html><b>costo dif.</b></html>");

    }
 private void iniciar_modelo_familiaeninventario()
    {
        jtable_modelo_familiaeninve=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_familiaeninve.addColumn("<html><b>Id Fam</b></html>");
        jtable_modelo_familiaeninve.addColumn("<html><b>Familia</b></html>");
    }
 private void iniciar_modelo_subfameninve()
    {
        jtable_modelo_subfameninve=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_subfameninve.addColumn("<html><b>Id Sub</b></html>");
        jtable_modelo_subfameninve.addColumn("<html><b>Sub Familia</b></html>");
    }
 private void iniciar_modelo_articuloseninve()
    {
        jtable_modelo_Articeninve=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_Articeninve.addColumn("<html><b>Temp. Ent.</b></html>");
        jtable_modelo_Articeninve.addColumn("<html><b>Familia</b></html>");
        jtable_modelo_Articeninve.addColumn("<html><b>Sub_fam.</b></html>");
        jtable_modelo_Articeninve.addColumn("<html><b>Id art.</b></html>");
        jtable_modelo_Articeninve.addColumn("<html><b>Clave</b></html>");
        jtable_modelo_Articeninve.addColumn("<html><b>Descripcion.</b></html>");
        jtable_modelo_Articeninve.addColumn("<html><b>Item.</b></html>");
        jtable_modelo_Articeninve.addColumn("<html><b>Costo</b></html>");
        jtable_modelo_Articeninve.addColumn("<html><b>Precio</b></html>");
        jtable_modelo_Articeninve.addColumn("<html><b>Teorico</b></html>");
        jtable_modelo_Articeninve.addColumn("<html><b>Fisico</b></html>");
        jtable_modelo_Articeninve.addColumn("<html><b>Dif</b></html>");
        jtable_modelo_Articeninve.addColumn("<html><b>Cod.Barra</b></html>");
    }
 private void iniciar_modelo_articulofisicohistorial()
    {
        jtable_modelo_Artihistorifisico=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_Artihistorifisico.addColumn("<html><b>Folio.</b></html>");
        jtable_modelo_Artihistorifisico.addColumn("<html><b>Descripcion</b></html>");
        jtable_modelo_Artihistorifisico.addColumn("<html><b>Fecha/Hora.</b></html>");
        jtable_modelo_Artihistorifisico.addColumn("<html><b>Realizo</b></html>");
        jtable_modelo_Artihistorifisico.addColumn("<html><b>superviso</b></html>");
        jtable_modelo_Artihistorifisico.addColumn("<html><b>Clave</b></html>");
        jtable_modelo_Artihistorifisico.addColumn("<html><b>Descripcion.</b></html>");
        jtable_modelo_Artihistorifisico.addColumn("<html><b>Cantidad</b></html>");
    }
 private void iniciar_modelo_de_sobrante()
    {
        jtable_modelo_sobrante=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_sobrante.addColumn("<html><b>Codigo.</b></html>");
        jtable_modelo_sobrante.addColumn("<html><b>Cantidad</b></html>");
        jtable_modelo_sobrante.addColumn("<html><b>Nombre</b></html>");
        jtable_modelo_sobrante.addColumn("<html><b>P. Unitario</b></html>");
        jtable_modelo_sobrante.addColumn("<html><b>Desc.</b></html>");
        jtable_modelo_sobrante.addColumn("<html><b>Total.</b></html>");
        jtable_modelo_sobrante.addColumn("<html><b>Idc.</b></html>");
        jtable_modelo_sobrante.addColumn("<html><b>Idd.</b></html>");
        jtable_modelo_sobrante.addColumn("<html><b>tipo.</b></html>");
    }
    private void iniciar_modelo_de_faltante()
    {
        jtable_modelo_faltante=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_faltante.addColumn("<html><b>Clave</b></html>");
        jtable_modelo_faltante.addColumn("<html><b>Cantidad</b></html>");
        jtable_modelo_faltante.addColumn("<html><b>Nombre</b></html>");
        jtable_modelo_faltante.addColumn("<html><b>P. Unitario</b></html>");
        jtable_modelo_faltante.addColumn("<html><b>Desc.</b></html>");
        jtable_modelo_faltante.addColumn("<html><b>Total.</b></html>");
        jtable_modelo_faltante.addColumn("<html><b>Idc.</b></html>");
        jtable_modelo_faltante.addColumn("<html><b>Idd.</b></html>");
        jtable_modelo_faltante.addColumn("<html><b>tipo.</b></html>");
    }

private void iniciar_modelo_subfam2()
    {

        jtable_modelo_subfam2=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_subfam2.addColumn("<html><b>Id subf</b></html>");
        jtable_modelo_subfam2.addColumn("<html><b>sub Familia</b></html>");
        jtable_modelo_subfam2.addColumn("<html><b>teorica.</b></html>");
        jtable_modelo_subfam2.addColumn("<html><b>fisica</b></html>");
        jtable_modelo_subfam2.addColumn("<html><b>dif</b></html>");
        jtable_modelo_subfam2.addColumn("<html><b>costo Fis</b></html>");
        jtable_modelo_subfam2.addColumn("<html><b>costo dif.</b></html>");

    }

private void iniciar_modelo_subfamhisto()
    {

        jtable_modelo_subfamhis=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_subfamhis.addColumn("<html><b>id SubF</b></html>");
        jtable_modelo_subfamhis.addColumn("<html><b>sub Familia</b></html>");
        jtable_modelo_subfamhis.addColumn("<html><b>teorica.</b></html>");
        jtable_modelo_subfamhis.addColumn("<html><b>fisica</b></html>");
        jtable_modelo_subfamhis.addColumn("<html><b>dif</b></html>");
        jtable_modelo_subfamhis.addColumn("<html><b>costo Fis</b></html>");
        jtable_modelo_subfamhis.addColumn("<html><b>costo dif.</b></html>");
        jtable_modelo_subfamhis.addColumn("<html><b>Fecha</b></html>");

    }

 private void iniciar_modelo_de_tabla2()
    {

        jtable_modelo2=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo2.addColumn("<html><b>Clave/Id</b></html>");
        jtable_modelo2.addColumn("<html><b>Descripcion.</b></html>");
        jtable_modelo2.addColumn("<html><b>Item.</b></html>");
        jtable_modelo2.addColumn("<html><b>Costo</b></html>");
        jtable_modelo2.addColumn("<html><b>Precio</b></html>");
        jtable_modelo2.addColumn("<html><b>Teorica</b></html>");
        jtable_modelo2.addColumn("<html><b>Fisica</b></html>");
        jtable_modelo2.addColumn("<html><b>Dif</b></html>");

    }

 private void iniciar_modelo_kardex()
 {
        jtable_modelo_kardex=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_kardex.addColumn("<html><BODY><b>Fecha</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Movimiento</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Precio</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Cantidad</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Historial</b></BODY></html>");
}
private void iniciar_modelo_estadistica()
    {
        jtable_modelo_estadistica=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_estadistica.addColumn("<html><b>Id Articulo</b></html>");
        jtable_modelo_estadistica.addColumn("<html><b>Cantidad</b></html>");
        jtable_modelo_estadistica.addColumn("<html><b>Titulo</b></html>");
    }
 private void loadcom_statusinve()
    {

            String texto="select * from x1sieuno_articulo_inven_programados_status(1,'','') as (id smallint,describe character varying(40));";
             System.out.println(texto);
            try
            {
                rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcbx_idstatus.addItem(rs.getString("id")+":"+rs.getString("describe"));
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }

    }
  private void dioclick(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:

         System.out.println("dio doble  click");

                int fila = jt_catainventarios.getSelectedRow();
                String idcadena[]=this.jt_catainventarios.getValueAt(fila, 0).toString().split(":");
     if(JOptionPane.showConfirmDialog(null, "<html><h2>Id Documento:"+idcadena[0]+"<br>Descripcion Inventario:"+this.jt_catainventarios.getValueAt(fila, 1).toString()+"<br>Deseas Ver Documento?</h2></html>")==0)
            {
               this.carga_datos_detalleinve(ftienda, ffoliopadre,1,idcadena[0]);
               this.jbtn_crearinvedetalle.setVisible(false);
               this.jtf_codigo.requestFocus();
               this.contararticulos();
            }
    }
  private void dioclicksobrante(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        System.out.println("dio doble  click");
        int fila = jt_sobrantes.getSelectedRow();
        this.jtf_deletefila.setText(String.valueOf(fila));

    }
private void dioclickfaltante(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        System.out.println("dio doble  click");
        int fila = jt_faltantes.getSelectedRow();
        this.jtf_deletefila1.setText(String.valueOf(fila));

    }
private void contararticulos()
    {
    int filas =this.jtable_modelo.getRowCount();
    this.jtf_totalarticulos.setText(String.valueOf(filas));
    }


private void carga_datos_catalogo(int idtienda,int idfoliopadre,int opcion,String textbusqueda)
    {
        String fechacat = "",fechallegatienda="",fechaentrega="";
         DecimalFormat miformat = new DecimalFormat("###,###,###,###.##");
       this.LimpiarJTablecat();
       Object[] fnewRow = new Object[10];
       double totalpiezas=0,totalcosto=0,totalprecio=0,totpr=0;
       //invoco al metodo que trae el recordset de datos
        String texto="select * from x1sieuno_articulo_inven_det_catalogov2("+idtienda+","+idfoliopadre+","+opcion+",'"+textbusqueda+"') as (id integer,idpadre integer,fechaaplica date,horaaplica text,fecharevisa date,horarevisa text,idempleelabora integer,idempleasuper integer,idsupervision integer,cantidadarticulo numeric,descripinve text,observa text,idstatusconge smallint,cantfisica numeric,importecosto numeric,importeprecio numeric,nombreelabora text,nombresupervisa text,nombreopera text,descripinvepadre text,fechaprogra date,descripstatus character varying(40),statuspadre smallint,difxrebaja double precision);";
        System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                fnewRow[0]=rs.getString ("id")+":"+rs.getString ("descripstatus");
                fnewRow[1]=rs.getString ("descripinve");
                fnewRow[2]="<html>"+this.fechaeuropea(rs.getString ("fechaaplica"))+":<br>"+DiaSemana(this.fechaeuropea(rs.getString ("fechaaplica")))+"</html>";
                 if(rs.getString("fecharevisa") != null)
                        {
                           fechallegatienda="<html>"+ rs.getString("fecharevisa")+":<br>"+DiaSemana(rs.getString ("fecharevisa"))+""+"</html>";
                        }
                 fnewRow[3]=fechallegatienda;
                 fnewRow[4]=rs.getString ("nombreelabora");
                 fnewRow[5]=rs.getString ("nombresupervisa");
                 if(rs.getInt ("idstatusconge")>0)
                    {
                        fnewRow[6]=miformat.format(rs.getFloat("cantfisica"));
                        if (variables_global.getnivelusu()<3)
                            {
                                fnewRow[7]=miformat.format(rs.getFloat("importecosto"));
                            }
                        else
                            {
                                fnewRow[7]="0";
                            }
                        fnewRow[8]=miformat.format(rs.getFloat("importeprecio"));
                        fnewRow[9]=miformat.format(rs.getFloat("importeprecio")+rs.getFloat("difxrebaja"));
                        totalpiezas+=rs.getDouble("cantfisica");
                        totalcosto+=rs.getDouble("importecosto");
                        totalprecio+=rs.getDouble("importeprecio");
                        totpr+=(rs.getFloat("importeprecio")+rs.getFloat("difxrebaja"));
                    }
                 else
                    {
                        fnewRow[6]="0";
                        fnewRow[7]="0";
                        fnewRow[8]="0";
                        fnewRow[9]="0";
                    }
                 
                 jtable_modelo_catalogo.addRow(fnewRow);

                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (variables_global.getnivelusu()<3)
        {
                fnewRow[0]="";
                fnewRow[1]="";
                fnewRow[2]="";
                fnewRow[3]="";
                fnewRow[4]="";
                fnewRow[5]="Totales:";
                fnewRow[6]=miformat.format(totalpiezas);
                fnewRow[7]=miformat.format(totalcosto);
                fnewRow[8]=miformat.format(totalprecio);
                fnewRow[9]=miformat.format(totpr);
                jtable_modelo_catalogo.addRow(fnewRow);
         }
        this.cambiartamanofilascat();
      }

private void carga_datos_emprealiza(String codigo)
    {
       //invoco al metodo que trae el recordset de datos
    int encontro=0;
    String realiza="",idrealiza="";

        try
         {
            rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_det_aplicadoresv2('"+codigo+"') as (id integer,nom character varying(50),pat character varying(50));",variables_global.getconexiongral());
            while (rs.next())
                {
                    encontro=1;
                    idrealiza=rs.getString("id");
                    realiza=rs.getString("nom")+" "+rs.getString("pat");
                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (encontro==1)
              {
                  if(JOptionPane.showConfirmDialog(null, "Realiza:"+realiza+" Esta Correcto?")==0)
                        {
                            this.jtf_idelabora.setText(idrealiza);
                            this.jtf_codelabora.setText(realiza);
                            this.jtf_codconfirmaconteo.requestFocus();
                            encontro=0;
                        }
                  else
                        {
                            this.jtf_codelabora.requestFocus();
                            this.jtf_codelabora.setText("");
                            encontro=0;
                        }
              }
       else
           {
               this.jtf_codelabora.requestFocus();
               this.jtf_codelabora.setText("");
               JOptionPane.showMessageDialog(null,"Error No existe el Empleado", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
               encontro=0;
           }
      }
private void carga_datos_empsupervisa(String codigo)
    {
       //invoco al metodo que trae el recordset de datos
    int encontro=0;
    String realiza="",idrealiza="";

        try
         {
            rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_det_aplicadoresv2('"+codigo+"') as (id integer,nom character varying(50),pat character varying(50));",variables_global.getconexiongral());
            while (rs.next())
                {
                    encontro=1;
                    idrealiza=rs.getString("id");
                    realiza=rs.getString("nom")+" "+rs.getString("pat");
                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (encontro==1)
              {
                  if(JOptionPane.showConfirmDialog(null, "Supervisa:"+realiza+" Esta Correcto?")==0)
                        {
                            this.jtf_idconfirma.setText(idrealiza);
                            this.jtf_codconfirmaconteo.setText(realiza);
                            encontro=0;
                            this.jbtn_crearinvedetalle.requestFocus();
                        }
                  else
                        {
                            this.jtf_codconfirmaconteo.requestFocus();
                            this.jtf_codconfirmaconteo.setText("");
                            encontro=0;
                        }
              }
       else
           {
               this.jtf_codconfirmaconteo.requestFocus();
               this.jtf_codconfirmaconteo.setText("");
               JOptionPane.showMessageDialog(null,"Error No existe el Empleado", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
               encontro=0;
           }
      }
private void creainventario(int idtie,int idpadre,int idelabora,int idsupervisa,String describe,String observa)
    {
       //invoco al metodo que trae el recordset de datos
    int folio=0;


        try
         {
            rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_det_insert("+idtie+","+idpadre+","+idelabora+","+idsupervisa+",'"+describe+"','"+observa+"');",variables_global.getconexiongral());
            while (rs.next())
                {
                       folio=rs.getInt(1);
                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (folio>0)
              {
                  JOptionPane.showMessageDialog(null,"Folio:"+folio+" Creado Correctamento","Sistema Integral(Inventarios: Alta) : Ayuda",1);

                            this.jtf_folio.setText(String.valueOf(folio));
                            this.jtf_codigo.requestFocus();
                            this.LimpiarJTabledetalle();
                            this.jtf_totalarticulos.setText("0");
                            this.jtf_totalpiezas.setText("0");

              }
       else
           {
               JOptionPane.showMessageDialog(null,"Error Folio no Creado Consulte a su ADMINISTRADOR", "Sistema Integral(Inventarios: Alta) : Ayuda",1);

           }
     }

private void creainventario_adddetalle(int idtie,int inve,String codigoenvia,float cantidad,String observacodigo)
    {
       //invoco al metodo que trae el recordset de datos
    int encontrado=0;
    String reb="";

        try
         {
            //rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_det_insert_detalle("+idtie+","+inve+",'"+codigoenvia+"',"+cantidad+",'"+observacodigo+"') as (id integer,claveproducto character varying(16),descrip character varying(80),costo numeric,precio numeric);",variables_global.getconexiongral());
            rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_det_insert_detallev4("+idtie+","+inve+",'"+codigoenvia+"',"+cantidad+",'"+observacodigo+"') as (id integer,claveproducto text,descrip text,costo numeric,precio double precision,existencia double precision,rebaja real);",variables_global.getconexiongral());
            while (rs.next())
                {
                       encontrado=1;
                       if(rs.getString("rebaja")!=null)
                        {
                           reb=rs.getString("rebaja");
                        }
                       else
                        {
                           reb="";
                        }
                       this.jep_articuloimagen1.setText("<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+rs.getString("claveproducto")+".JPG\" width=\"300\" height=\"160\" border=\"0\" alt=\"Foto Articulo\"></img>");
                       this.creainventario_adddetalle_tabla(rs.getString("id"),rs.getString("claveproducto"),rs.getString("descrip"),rs.getString("precio"),String.valueOf(cantidad),observacodigo,reb);
                        if(rs.getString("rebaja")!=null)
                        {
                           JOptionPane.showMessageDialog(null,"<html><h2><b>El Articulo:<br>"+rs.getString("claveproducto")+" <br>Rebajado Porfavor Verifique!</b></h2></html>", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
                        }

                         
                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (encontrado==1)
              {
                   this.jtf_codigo.setText("");
                   this.jtf_codigo.requestFocus();

              }
       else
           {
               JOptionPane.showMessageDialog(null,"<html><h2><b>Error Codigo:<br>"+codigoenvia+" <br>No existe! <br>Verifique que sea un codigo Ean8</b></h2></html>", "Sistema Integral(Inventarios: Alta) : Ayuda",1);

           }
     }
private void creainventario_actualiza(int idtie,int inve,int opcion,String observadocto)
    {
       //invoco al metodo que trae el recordset de datos
    int encontrado=0;
    String texto="select * from x1sieuno_articulo_inven_det_actualiza("+idtie+","+inve+","+opcion+",'"+observadocto+"');";
    System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                     encontrado=rs.getInt(1);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (encontrado==1)
              {
               JOptionPane.showMessageDialog(null,"Gracias!", "Sistema Integral(Inventarios: Alta) : Ayuda",1);

              }
       else
           {
               JOptionPane.showMessageDialog(null,"Error Documento no Actualizado!", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
           }
     }

private void creainventario_aplicar(int idtie,int invepadre,int idinvehijo)
    {
       //invoco al metodo que trae el recordset de datos
    int encontrado=0;
    String texto="select * from x1sieuno_articulo_inven_congelar_addfis("+idtie+","+invepadre+","+idinvehijo+");";
    System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                     encontrado=rs.getInt(1);
                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (encontrado==1)
              {
               JOptionPane.showMessageDialog(null,"Gracias Documento Integrado", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
              }
       else
           {
               JOptionPane.showMessageDialog(null,"Error Documento no Actualizado!", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
           }
     }

private void creainventario_adddetalle_tabla(String id,String codigo,String descripcion,String precio,String cantidad,String observa,String rebaja)
{
   int numeroarticulos=this.jtable_modelo.getRowCount();
   String codigoactual="";
   float cantidadanterior=0,cantidadactual=0,totalpiezasf=0;
   int encontrado=0;
    Object[] fnewRow = new Object[7];
       //invoco al metodo que trae el recordset de datos
    for(int ii=0;ii<numeroarticulos;ii++)
                {
                    codigoactual=jtable_modelo.getValueAt(ii, 1).toString();
                    if (codigo.equals(codigoactual))
                        {
                            encontrado=1;
                            cantidadanterior=Float.valueOf(jtable_modelo.getValueAt(ii, 4).toString());
                            cantidadactual=cantidadanterior+Float.valueOf(cantidad);
                            jtable_modelo.setValueAt(cantidadactual,ii ,4);
                            jtable_modelo.setValueAt(observa,ii ,5);
                            totalpiezasf=Float.valueOf(this.jtf_totalpiezas.getText().replace(",",""))+Float.valueOf(cantidad);
                            this.jtf_totalpiezas.setText(String.valueOf(totalpiezasf));
                        }
                }
       if(encontrado==0)
            {
                fnewRow[0]=id;
                fnewRow[1]=codigo;
                fnewRow[2]=descripcion;
                fnewRow[3]=precio;
                fnewRow[4]=cantidad;
                fnewRow[5]=observa;
                fnewRow[6]=rebaja;
                totalpiezasf=Float.valueOf(this.jtf_totalpiezas.getText().replace(",",""))+Float.valueOf(cantidad);
                this.jtf_totalpiezas.setText(String.valueOf(totalpiezasf));
                jtable_modelo.addRow(fnewRow);
                cantidadactual=Float.valueOf(cantidad);
            }
       this.jtf_ultimocodigo.setText(codigo);
       this.jtf_ultimoprecio.setText(precio);
       this.jft_ultimodescripcion.setText(descripcion);
       this.jtf_cananterior.setText(String.valueOf(cantidadanterior));
       this.jtf_canactual.setText(String.valueOf(cantidadactual));
       this.jtf_ultimoprecioreb.setText(rebaja);
}

private void carga_datos_reportedifxsub(int idtienda,int idfoliopadre)
    {

         DecimalFormat miformat = new DecimalFormat("###,###,###,###");

       //invoco al metodo que trae el recordset de datos
        while(jtable_modelo_subfam2.getRowCount()>0)jtable_modelo_subfam2.removeRow(0);
       //voy por el detalle del documento
    float cteo=0,cfis=0,cdif=0,costofis=0,costodif=0;
       Object[] fnewRow = new Object[7];

        try
         {
           rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_congelar_reportdifxsubfam("+idtienda+","+idfoliopadre+") as (idpadre integer,subfam integer,nombresubfam character varying(50),cantteo numeric,cantfis numeric,importecosfis numeric,importeprefis numeric,importecosteo numeric,importepreteo numeric,cantidaddif numeric,costodif numeric,preciodif numeric);",variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("subfam");
                        fnewRow[1]=rs.getString("nombresubfam");
                        fnewRow[2]=miformat.format(rs.getFloat("cantteo"));
                        fnewRow[3]=miformat.format(rs.getFloat("cantfis"));
                        fnewRow[4]=miformat.format(rs.getFloat("cantidaddif"));
                        fnewRow[5]=miformat.format(rs.getFloat("importecosfis"));
                        fnewRow[6]=miformat.format(rs.getFloat("costodif"));
                        cteo+=rs.getFloat("cantteo");
                        cfis+=rs.getFloat("cantfis");
                        cdif+=rs.getFloat("cantidaddif");
                        costofis+=rs.getFloat("importecosfis");
                        costodif+=rs.getFloat("costodif");
                        jtable_modelo_subfam2.addRow(fnewRow);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

         fnewRow[0]="Totales";
                fnewRow[1]=miformat.format(cteo);
                fnewRow[2]=miformat.format(cfis);
                fnewRow[3]=miformat.format(cdif);
                fnewRow[4]=miformat.format(costofis);
                fnewRow[5]=miformat.format(costodif);
                jtable_modelo_subfam2.addRow(fnewRow);
      }
private String  fechaeuropea(String fecha) {

         //resibe cadena de fecha en formato americano yyyy-MM-dd
        java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateadoresta.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaeuropa.format(fechaestaeuropa);
       return cadenafecha;

    }
private String DiaSemana(String fe) {
         String dia = "";
       java.util.Date fecha=null;
         try
            {
             fecha = formateador.parse(fe);

           }
        catch (ParseException e)
            {
            //Error, la cadena de texto no se puede convertir en fecha.
            }
        Calendar cal= Calendar.getInstance();
        cal.setTime(fecha);
        //ojo para establecer o recetear cada parte de la fecha por separado
        //cal.set(Calendar.YEAR, fecha.getYear());
        //cal.set(Calendar.MONTH, fecha.getMonth());
        //cal.set(Calendar.DAY_OF_MONTH, fecha.getDay());
        int diaInt = cal.get(Calendar.DAY_OF_WEEK);
        switch (diaInt) {
            case 1:
                dia = "Domingo";
                break;
            case 2:
                dia = "Lunes";
                break;
            case 3:
                dia = "Martes";
                break;
            case 4:
                dia = "Miercoles";
                break;
            case 5:
                dia = "Jueves";
                break;
            case 6:
                dia = "Viernes";
                break;
            case 7:
                dia = "Sabado";
                break;

        }
        return dia;
    }

private void LimpiarJTablecat()
 {
     //limpiar la tabla
    while(jtable_modelo_catalogo.getRowCount()>0)jtable_modelo_catalogo.removeRow(0);
 }
private void LimpiarJTabledetalle()
 {
     //limpiar la tabla
    while(this.jtable_modelo.getRowCount()>0)this.jtable_modelo.removeRow(0);
 }
private void cambiartamanofilascat()
 {
     //limpiar la tabla


       int numerofilas=this.jtable_modelo_catalogo.getRowCount();

             for(int i = 0 ;i < numerofilas; i++)
                {
                     this.jt_catainventarios.setRowHeight(i, 30);
                }
  }

private void congelar_existencias(int tienda,int inventario,int opcion)
    {
       //invoco al metodo que trae el recordset de datos
    int resultado=0;
    String texto="select * from x1sieuno_articulo_inven_congelarv4("+opcion+","+tienda+","+inventario+");";
    System.out.println(texto);
       try
        {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    resultado=rs.getInt(1);
                }
        }
        catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
       if (resultado==1)
            {
                    this.jtf_idstatus.setText("3");
                  JOptionPane.showMessageDialog(null,"Gracias Inventario congelado","Sistema Integral(Inventarios: Alta) : Ayuda",1);
            }
       if (resultado==2)
            {
                  JOptionPane.showMessageDialog(null,"Error Inventario ya esta Congelado","Sistema Integral(Inventarios: Alta) : Ayuda",1);
            }
}

private void carga_datos_detalleinve(int idtienda,int idfoliopadre,int opcion,String textbusqueda)
{
          DecimalFormat miformat = new DecimalFormat("############.##");
          this.jtf_codigo.setEditable(true);
          this.jtf_codigoinve_observa.setEditable(true);
          this.jbtn_cerrardocto.setVisible(true);
          this.jbtn_autorizarinventario.setVisible(false);
          this.jbtn_agregarainvecongelado.setVisible(false);
          String texto="select * from x1sieuno_articulo_inven_det_catalogo("+idtienda+","+idfoliopadre+","+opcion+",'"+textbusqueda+"') as (id integer,idpadre integer,fechaaplica date,horaaplica text,fecharevisa date,horarevisa text,idempleelabora integer,idempleasuper integer,idsupervision integer,cantidadarticulo numeric,descripinve text,observa text,idstatusconge smallint,cantfisica numeric,importecosto numeric,importeprecio numeric,nombreelabora text,nombresupervisa text,nombreopera text,descripinvepadre text,fechaprogra date,descripstatus character varying(40),statuspadre smallint);";
          //invoco al metodo que trae el recordset de datos
          System.out.println(texto);
        try
             {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                this.jtf_folio.setText(rs.getString ("id"));
                this.jtf_descripinventario.setText(rs.getString ("descripinve"));
                this.jtf_codelabora.setText(rs.getString ("nombreelabora"));
                this.jtf_codconfirmaconteo.setText(rs.getString ("nombresupervisa"));
                this.jtf_totalpiezas.setText(miformat.format(rs.getFloat("cantfisica")));
                this.jtf_inveactualstatus.setText(rs.getString ("descripstatus"));
                this.jtf_inveactualfecha.setText(this.fechaeuropea(rs.getString ("fechaaplica"))+" "+rs.getString ("horaaplica").substring(0,5));
                if((rs.getInt("idstatusconge")>3) || (rs.getInt("idstatusconge")<1))
                    {
                        this.jtf_codigo.setEditable(false);
                        this.jtf_codigoinve_observa.setEditable(false);

                        this.jbtn_cerrardocto.setVisible(false);
                    }
                if (variables_global.getnivelusu()<3)
                    {
                       if(rs.getInt("idstatusconge")==4)
                            {
                                this.jbtn_autorizarinventario.setVisible(true);
                            }
                        if(rs.getInt("idstatusconge")==5)
                            {
                                this.jbtn_agregarainvecongelado.setVisible(true);
                            }
                    if(rs.getInt("idstatusconge")!=0)
                        {
                            this.jbtn_cancelar.setVisible(true);
                        }

                    }
                }
            }
        catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
       //voy por el detalle del documento
       this. LimpiarJTabledetalle();
       this.jButton3.setVisible(true);
       Object[] fnewRow = new Object[7];
       texto="select * from x1sieuno_articulo_inven_det_detalle("+idtienda+",2,"+Integer.valueOf(textbusqueda)+",'','') as (id integer,idpadre integer,clavearticulo character varying(16),cantfisica numeric,observacion text,costo numeric,precioventa numeric,importecosto numeric,importeprecio numeric,descripcion text,familia integer,subfam integer,tementrada character varying(25),item character varying(80),precio1actual double precision,nobrefamilia character varying(30),nombrefamilia character varying(50),idproducto integer,codigo text,pr real);";
       System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("idproducto");
                        fnewRow[1]=rs.getString("clavearticulo");
                        fnewRow[2]=rs.getString("descripcion");
                        fnewRow[3]=rs.getString("precioventa");
                        fnewRow[4]=rs.getString("cantfisica");
                        fnewRow[5]=rs.getString("observacion");
                        if(rs.getString("pr")!=null)
                            {
                                fnewRow[6]=miformat.format(rs.getFloat("pr"));
                            }
                        else
                            {
                                fnewRow[6]="";
                            }
                        jtable_modelo.addRow(fnewRow);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }


}

private void carga_datos_vermisarticulos(int idtienda,int idfoliopadre)
    {
       this. LimpiarJTabledetalle();
       Object[] fnewRow = new Object[7];
       String texto="select * from x1sieuno_articulo_inven_congelar_reportdiferencias("+idtienda+","+idfoliopadre+",0,'') as (iddet integer,idfisico integer,clave character varying(16),cantteo numeric,cantfis numeric,observa text,costo numeric,precio numeric,impcostofis numeric,importpreciofis numeric,importcosteo numeric,importprecioteo numeric,cantdif numeric,costodif numeric,preciodif numeric,descripcion character varying(80),familia integer,subfam integer,fechaulti date,tementrada character varying(25),item character varying(80),precio1 numeric,nombrefamilia character varying(30),nombresubfamilia character varying(50),idproducto integer);";

        try
         {
                   rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("idproducto");
                        fnewRow[1]=rs.getString("clave");
                        fnewRow[2]=rs.getString("descripcion");
                        fnewRow[3]=rs.getString("precio");
                        fnewRow[4]="";
                        fnewRow[5]="";
                        fnewRow[6]="";
                        jtable_modelo.addRow(fnewRow);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
    }

private void carga_datos_reportediferencias(int idtienda,int idfoliopadre,int opcion,String textbusqueda)
    {
       DecimalFormat miformat = new DecimalFormat("############.##");
       String htmlabre="<html><BODY>",htmlcierra="</BODY></html>",colorabre="",colorcierra="";
       //invoco al metodo que trae el recordset de datos
       while(jtable_modelo_diferencias.getRowCount()>0)jtable_modelo_diferencias.removeRow(0);
       //voy por el detalle del documento
       float colexis=0,so=0,fa=0;
       Object[] fnewRow = new Object[10];
       String texto="select * from x1sieuno_articulo_inven_congelar_reportdiferencias("+idtienda+","+idfoliopadre+","+opcion+",'"+textbusqueda+"') as (iddet integer,idfisico integer,clave character varying(16),cantteo numeric,cantfis numeric,observa text,costo numeric,precio numeric,impcostofis numeric,importpreciofis numeric,importcosteo numeric,importprecioteo numeric,cantdif numeric,costodif numeric,preciodif numeric,descripcion character varying(80),familia integer,subfam integer,fechaulti date,tementrada character varying(25),item character varying(80),precio1 numeric,nombrefamilia character varying(30),nombresubfamilia character varying(50),idproducto integer);";
       System.out.println(texto);
        try
        {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("idproducto")+":"+rs.getString("tementrada");
                        fnewRow[1]=rs.getString("nombrefamilia");
                        fnewRow[2]=rs.getString("clave");
                        fnewRow[3]=rs.getString("descripcion");
                        fnewRow[4]=rs.getString("item");
                        fnewRow[5]=miformat.format(rs.getFloat("costo"));
                        fnewRow[6]=miformat.format(rs.getFloat("precio"));
                        fnewRow[7]=miformat.format(rs.getFloat("cantteo"));
                        fnewRow[8]=miformat.format(rs.getFloat("cantfis"));
                        colexis=rs.getFloat("cantdif");
                        colorabre="";
                        colorcierra="";
                        if (colexis<0)
                                {
                                    colorabre="<b><font color=#CC0000>";
                                    colorcierra="<font></b>";
                                    this.tabla_articulos_inventariados_fal(rs.getString("clave").toString(),rs.getString("descripcion"),miformat.format(rs.getFloat("precio")),miformat.format(rs.getFloat("cantdif")*-1));
                                    fa+=rs.getFloat("cantdif");
                                }
                        if (colexis>0)
                                {
                                    colorabre="<b><font color=#FFE900>";
                                    colorcierra="<font></b>";
                                    this.tabla_articulos_inventariados_sob(rs.getString("clave").toString(),rs.getString("descripcion"),miformat.format(rs.getFloat("precio")),miformat.format(rs.getFloat("cantdif")));
                                    so+=rs.getFloat("cantdif");
                                }
                        if (colexis==0)
                                {
                                    this.tabla_articulos_inventariados_sob(rs.getString("clave").toString(),rs.getString("descripcion"),miformat.format(rs.getFloat("precio")),miformat.format(rs.getFloat("cantdif")));
                                }
                        fnewRow[9]=htmlabre+colorabre+rs.getFloat("cantdif")+colorcierra+htmlcierra;
                        if(opcionfys==1)
                        jtable_modelo_diferencias.addRow(fnewRow);
                        if((opcionfys==2) && (colexis<0))
                        jtable_modelo_diferencias.addRow(fnewRow);
                        if((opcionfys==3) && (colexis>0))
                        jtable_modelo_diferencias.addRow(fnewRow);
              }
        }
        catch(Exception e)
         {
            System.out.println(e.getMessage());
        }
        this.jtf_importefal3.setText(miformat.format(so));
        this.jtf_importefal4.setText(miformat.format(fa));

      }
private void carga_datos_reportediffamilia(int opcion,int idtienda,int idfoliopadre,String busqueda)
    {
       DecimalFormat miformat = new DecimalFormat("###,###,###,###");
       //invoco al metodo que trae el recordset de datos
       while(jtable_modelo_familia.getRowCount()>0)jtable_modelo_familia.removeRow(0);
       //voy por el detalle del documento
       float cteo=0,cfis=0,cdif=0,costofis=0,costoteo=0,costodif=0;
       String texto="select * from x1sieuno_articulo_inven_congelar_reportdiferencia("+opcion+","+idtienda+","+idfoliopadre+",'"+busqueda+"') as (idpadre integer,idfam integer,nombrefam character varying(30),cantteo numeric,cantfis numeric,importecosfis numeric,importeprefis numeric,importecosteo numeric,importepreteo numeric,cantidaddif numeric,costodif numeric,preciodif numeric);";
       Object[] fnewRow = new Object[7];
       System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("idfam")+":"+rs.getString("nombrefam");
                        fnewRow[1]=miformat.format(rs.getFloat("cantteo"));
                        fnewRow[2]=miformat.format(rs.getFloat("cantfis"));
                        fnewRow[3]=miformat.format(rs.getFloat("cantidaddif"));
                        fnewRow[4]=miformat.format(rs.getFloat("importecosteo"));
                        fnewRow[5]=miformat.format(rs.getFloat("importecosfis"));
                        fnewRow[6]=miformat.format(rs.getFloat("costodif"));
                        cteo+=rs.getFloat("cantteo");
                        cfis+=rs.getFloat("cantfis");
                        cdif+=rs.getFloat("cantidaddif");
                        costofis+=rs.getFloat("importecosfis");
                        costoteo+=rs.getFloat("importecosteo");
                        costodif+=rs.getFloat("costodif");
                        jtable_modelo_familia.addRow(fnewRow);
                }
                        fnewRow[0]="Totales";
                        fnewRow[1]=miformat.format(cteo);
                        fnewRow[2]=miformat.format(cfis);
                        fnewRow[3]=miformat.format(cdif);
                        fnewRow[4]=miformat.format(costoteo);
                        fnewRow[5]=miformat.format(costofis);
                        fnewRow[6]=miformat.format(costodif);
                        jtable_modelo_familia.addRow(fnewRow);
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
      }
private void carga_datos_reportedifxsub(int opcion,int idtienda,int idfoliopadre,String busqueda)
    {

         DecimalFormat miformat = new DecimalFormat("###,###,###,###");

       //invoco al metodo que trae el recordset de datos
        while(jtable_modelo_subfam.getRowCount()>0)jtable_modelo_subfam.removeRow(0);
       //voy por el detalle del documento
        Object[] fnewRow = new Object[6];
        float cteo=0,cfis=0,cdif=0,costofis=0,costodif=0;
        String texto="select * from x1sieuno_articulo_inven_congelar_reportdiferencia("+opcion+","+idtienda+","+idfoliopadre+",'"+busqueda+"') as (idpadre integer,idfam integer,subfam integer,nombresubfam character varying(50),cantteo numeric,cantfis numeric,importecosfis numeric,importeprefis numeric,importecosteo numeric,importepreteo numeric,cantidaddif numeric,costodif numeric,preciodif numeric);";
        System.out.println(texto);
        try
            {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {

                        fnewRow[0]=rs.getString("subfam")+":"+rs.getString("nombresubfam");
                        fnewRow[1]=miformat.format(rs.getFloat("cantteo"));
                        fnewRow[2]=miformat.format(rs.getFloat("cantfis"));
                        fnewRow[3]=miformat.format(rs.getFloat("cantidaddif"));
                        fnewRow[4]=miformat.format(rs.getFloat("importecosfis"));
                        fnewRow[5]=miformat.format(rs.getFloat("costodif"));
                        cteo+=rs.getFloat("cantteo");
                        cfis+=rs.getFloat("cantfis");
                        cdif+=rs.getFloat("cantidaddif");
                        costofis+=rs.getFloat("importecosfis");
                        costodif+=rs.getFloat("costodif");
                        jtable_modelo_subfam.addRow(fnewRow);
                }
                fnewRow[0]="Totales";
                fnewRow[1]=miformat.format(cteo);
                fnewRow[2]=miformat.format(cfis);
                fnewRow[3]=miformat.format(cdif);
                fnewRow[4]=miformat.format(costofis);
                fnewRow[5]=miformat.format(costodif);
                jtable_modelo_subfam.addRow(fnewRow);
            }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }


      }
private void carga_datos_verfameninve(int opcion,int idtienda,int idfoliopadre,String busqueda)
    {
       //invoco al metodo que trae el recordset de datos
       while(jtable_modelo_familiaeninve.getRowCount()>0)jtable_modelo_familiaeninve.removeRow(0);
       //voy por el detalle del documento
       Object[] fnewRow = new Object[2];
        try
         {
            rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_congelar_reportdiferencia("+opcion+","+idtienda+","+idfoliopadre+",'"+busqueda+"') as (idfam integer,nombrefam character varying(30));",variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("idfam");
                        fnewRow[1]=rs.getString("nombrefam");
                        jtable_modelo_familiaeninve.addRow(fnewRow);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
      }
private void carga_datos_versubfameninve(int opcion,int idtienda,int idfoliopadre,String busqueda)
    {
       while(jtable_modelo_subfameninve.getRowCount()>0)jtable_modelo_subfameninve.removeRow(0);
       //voy por el detalle del documento
       Object[] fnewRow = new Object[2];
        try
         {
          rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_congelar_reportdiferencia("+opcion+","+idtienda+","+idfoliopadre+",'"+busqueda+"') as (idsubfam integer,nombresubfam character varying(50));",variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("idsubfam");
                        fnewRow[1]=rs.getString("nombresubfam");
                        jtable_modelo_subfameninve.addRow(fnewRow);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
      }
private void carga_datos_verarticuloseninve(int idtienda,int idfoliopadre,int opcion,String textbusqueda)
    {
       DecimalFormat miformat = new DecimalFormat("###,###,###,###.##");
       String htmlabre="<html><BODY>",htmlcierra="</BODY></html>",colorabre="",colorcierra="";
       //invoco al metodo que trae el recordset de datos
       while(jtable_modelo_Articeninve.getRowCount()>0)jtable_modelo_Articeninve.removeRow(0);
       //voy por el detalle del documento
       Object[] fnewRow = new Object[13];
       double teorica=0,fis=0,cteo=0,pteo=0;
       String texto="select * from x1sieuno_articulo_inven_congelar_reportdiferencias("+idtienda+","+idfoliopadre+","+opcion+",'"+textbusqueda+"') as (iddet integer,idfisico integer,clave character varying(16),cantteo numeric,cantfis numeric,observa text,costo numeric,precio numeric,impcostofis numeric,importpreciofis numeric,importcosteo numeric,importprecioteo numeric,cantdif numeric,costodif numeric,preciodif numeric,descripcion character varying(80),familia integer,subfam integer,fechaulti date,tementrada character varying(25),item character varying(80),precio1 numeric,nombrefamilia character varying(30),nombresubfamilia character varying(50),idproducto integer,codbarra character varying(16));";
       System.out.println(texto);
        try
        {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        cteo+=rs.getFloat("importcosteo");
                        pteo+=rs.getFloat("importprecioteo");

                        teorica+=rs.getFloat("cantteo");
                        fis+=rs.getFloat("cantfis");
                        fnewRow[0]=rs.getString("tementrada");
                        fnewRow[1]=rs.getString("nombrefamilia");
                        fnewRow[2]=rs.getString("nombresubfamilia");
                        fnewRow[3]=rs.getString("idproducto");
                        fnewRow[4]=rs.getString("clave");
                        fnewRow[5]=rs.getString("descripcion");
                        fnewRow[6]=rs.getString("item");
                        fnewRow[7]=miformat.format(rs.getFloat("costo"));
                        fnewRow[8]=miformat.format(rs.getFloat("precio"));
                        fnewRow[9]=miformat.format(rs.getFloat("cantteo"));
                        fnewRow[10]=miformat.format(rs.getFloat("cantfis"));
                        fnewRow[11]=miformat.format(rs.getFloat("cantdif"));
                        fnewRow[12]=rs.getString("codbarra");
                        jtable_modelo_Articeninve.addRow(fnewRow);
              }
        }
        catch(Exception e)
         {
            System.out.println(e.getMessage());
        }
this.jtf_articuloscantidad1.setText(miformat.format(teorica));
this.jtf_articuloscantidadf.setText(miformat.format(fis));
this.jtf_articuloscantidad.setText(String.valueOf(this.jtable_modelo_Articeninve.getRowCount()));
this.jtf_ifcosto.setText(miformat.format(cteo));
this.jtf_ifprecio.setText(miformat.format(pteo));


      }
private void carga_datos_verarticuloseninve_histori(int idtienda,int idfoliopadre,int opcion,String textbusqueda)
    {
       DecimalFormat miformat = new DecimalFormat("###,###,###,###");
       String htmlabre="<html><BODY>",htmlcierra="</BODY></html>",colorabre="",colorcierra="";
       //invoco al metodo que trae el recordset de datos
       while(jtable_modelo_Artihistorifisico.getRowCount()>0)jtable_modelo_Artihistorifisico.removeRow(0);
       //voy por el detalle del documento
       Object[] fnewRow = new Object[8];
       String texto="select * from x1sieuno_articulo_inven_det_detalle("+idtienda+","+opcion+","+idfoliopadre+",'"+textbusqueda+"','') as (id integer,idpadre integer,clavearticulo character varying(16),cantfisica numeric,observacion text,costo numeric,precioventa numeric,importecosto numeric,importeprecio numeric,descripcion character varying(80),familia integer,subfam integer,tementrada character varying(25),item character varying(80),precio1actual numeric,nobrefamilia character varying(30),nombrefamilia character varying(50),idproducto integer,idinvefisico integer,fechaaplicacion date,horaaplica text,idelbora integer,idsupervisa integer,describeinve text,observaciones text,idstatusconge smallint,nombreelabora text,nombresupervisa text,describestatus character varying(40),idstatuspadre smallint);";
       System.out.println(texto);
       try
        {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("idpadre");
                        fnewRow[1]=rs.getString("describeinve");
                        fnewRow[2]=this.fechaeuropea(rs.getString("fechaaplicacion"))+" "+this.DiaSemana(rs.getString("fechaaplicacion")).substring(0,3)+" "+rs.getString("horaaplica");
                        fnewRow[3]=rs.getString("idelbora")+":"+rs.getString("nombreelabora");
                        fnewRow[4]=rs.getString("idsupervisa")+":"+rs.getString("nombresupervisa");
                        fnewRow[5]=rs.getString("clavearticulo");
                        fnewRow[6]=rs.getString("descripcion");
                        fnewRow[7]=rs.getString("cantfisica");
                        jtable_modelo_Artihistorifisico.addRow(fnewRow);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       this.jlbl_historial.setText("Historial Articulo:"+textbusqueda+" Registros="+this.jtable_modelo_Artihistorifisico.getRowCount());

      }

private void tabla_articulos_exportar()
{

   for(int ii=0;ii<this.jtable_modelo_diferencias.getRowCount();ii++)
       {
               // this.tabla_articulos_inventariados(jtable_modelo_diferencias.getValueAt(ii, 2).toString(),jtable_modelo_diferencias.getValueAt(ii, 3).toString(),jtable_modelo_diferencias.getValueAt(ii, 6).toString(),jtable_modelo_diferencias.getValueAt(ii, 9).toString().replace("<html><BODY>", "").replace("</BODY></html>", "").replace("<b><font color=#CC0000>", "").replace("<font></b>", "").replace("<b><font color=#FFE900>", "").replace("", "").replace("", ""));
       }
}

private void tabla_articulos_inventariados_sob(String clave, String descripcion, String precio,String cantidad)
{
  
   String codigoactual="",nega="",falta="",sobra="";
    DecimalFormat miformat = new DecimalFormat("############.##");
   float cantidadanterior=0,cantidadactual=0,totalpiezasf=0;
   int encontrado=0;
   Object[] fnewRow = new Object[8];
       //invoco al metodo que trae el recordset de datos
   /*for(int ii=0;ii<this.jtable_modelo_sobrante.getRowCount();ii++)
                {
                    codigoactual=jtable_modelo_sobrante.getValueAt(ii, 1).toString();
                    if (clave.equals(codigoactual))
                        {
                            encontrado=1;
                        }
                }*/
   if(encontrado==0)
            {
                sobra=cantidad;
                jtable_modelo_sobrante.addRow(new Object[]{clave,cantidad,descripcion,precio,"0",Float.valueOf(cantidad.replace("-", ""))*(Float.valueOf(precio)),"0","0","1"});
                this.jtf_importesob.setText(miformat.format(Float.valueOf(this.jtf_importesob.getText().toString()).floatValue()+(Float.valueOf(sobra)*Float.valueOf(precio))));
            }

this.jtf_importefal2.setText(String.valueOf(this.jtable_modelo_sobrante.getRowCount()));
this.jtf_importefal1.setText(String.valueOf(this.jtable_modelo_faltante.getRowCount()));



}

private void tabla_articulos_inventariados_fal(String clave, String descripcion, String precio,String cantidad)
{

   String codigoactual="",nega="",falta="",sobra="";
    DecimalFormat miformat = new DecimalFormat("############.##");
   float cantidadanterior=0,cantidadactual=0,totalpiezasf=0;
   int encontrado=0;
   Object[] fnewRow = new Object[8];
       //invoco al metodo que trae el recordset de datos

     /* for(int ii=0;ii<this.jtable_modelo_faltante.getRowCount();ii++)
                {
                    codigoactual=jtable_modelo_faltante.getValueAt(ii, 0).toString();
                    if (clave.equals(codigoactual))
                        {
                            encontrado=1;
                        }
                }*/
        if(encontrado==0)
            {
               falta=cantidad.replace("-", "");
               jtable_modelo_faltante.addRow(new Object[]{clave,cantidad.replace("-", ""),descripcion,precio,"0",Float.valueOf(cantidad.replace("-", ""))*(Float.valueOf(precio)),"0","0","1"});
               this.jtf_importefal.setText(miformat.format(Float.valueOf(this.jtf_importefal.getText().toString()).floatValue()+((Float.valueOf(falta)*Float.valueOf(precio)))));
            }




this.jtf_importefal2.setText(String.valueOf(this.jtable_modelo_sobrante.getRowCount()));
this.jtf_importefal1.setText(String.valueOf(this.jtable_modelo_faltante.getRowCount()));



}
private void diodblclickfam(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
            System.out.println("dio doble  click");
            int fila = jt_repfamilia.getSelectedRow();
            String idcadena[]=this.jt_repfamilia.getValueAt(fila, 0).toString().split(":");
             if(JOptionPane.showConfirmDialog(null, "Desea Ver detalle?")==0)
                {
                    this.carga_datos_reportedifxsub(2, ftienda, ffoliopadre, idcadena[0]);
                    this.carga_datos_reportediferencias(ftienda,ffoliopadre,1,idcadena[0]);

                }


    }
private void diodblclick(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
            System.out.println("dio doble  click en subfamilia");
            int fila = jt_repsubfam.getSelectedRow();
            String idcadena[]=this.jt_repsubfam.getValueAt(fila, 0).toString().split(":");
            this.carga_datos_reportediferencias(ftienda,ffoliopadre,2,idcadena[0]);
              this.buttonGroup1.setSelected(jrbtn_ambos.getModel(), true);
            this.jtf_subfamactual.setText(idcadena[0]+":"+idcadena[1]);
    }

   private void dioclickidarti(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");
         int fila = jtb_catalogo_articulos.getSelectedRow();

         String idcadena[]=null;
          idcadena = jtb_catalogo_articulos.getValueAt(fila, 0).toString().split(":");
        //JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
         if(JOptionPane.showConfirmDialog(null, "Desea ver Articulo?")==0)
        {
            try
            {
                    articulos_sie_editar fase=new articulos_sie_editar(idcadena[0]);
                    fase.pack();
                    fase.setVisible(true);
            }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }

            }

         this.carga_datos_verarticuloseninve_histori(ftienda,ffoliopadre,1,idcadena[0]);
    }
    private void dioclickidartideta(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         //System.out.println("dio doble  click");
         int fila = jtb_catalogo_articulos.getSelectedRow();
         String idcadena[]=null;
        //JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();

         idcadena = jtb_catalogo_articulos.getValueAt(fila, 0).toString().split(":");
         System.out.println("dio doble  click");
         this.jep_articuloimagen.setText("<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtb_catalogo_articulos.getValueAt(fila, 2).toString()+".JPG\" width=\"190\" height=\"208\" border=\"0\" alt=\"Foto Articulo\"></img>");
         this.carga_datos_verarticuloseninve_histori(ftienda,ffoliopadre,1,idcadena[0]);
    }
   private void diodblclickverfameninve(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
            System.out.println("dio doble  click");
            int fila = jt_eninvefamilia.getSelectedRow();
            if(JOptionPane.showConfirmDialog(null, "Desea Ver detalle?")==0)
            {
                    String idcadena=this.jt_eninvefamilia.getValueAt(fila, 0).toString();
                    this.carga_datos_versubfameninve(4, ftienda, ffoliopadre, idcadena);
            }
    }
   private void diodblclickvsaeninve(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
            System.out.println("dio doble  click en subfamilia");
            int fila = jt_eninvesfamilia.getSelectedRow();
            String idcadena=this.jt_eninvesfamilia.getValueAt(fila, 0).toString();
        if(JOptionPane.showConfirmDialog(null, "Desea Ver detalle?")==0)
            {
                this.carga_datos_verarticuloseninve(ftienda, ffoliopadre, 2, idcadena);
            }
    }

private void diodblclick2(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
            System.out.println("dio doble  click");
            int fila = jt_repsubfam1.getSelectedRow();
            String idcadena=this.jtable_modelo_subfam2.getValueAt(fila, 0).toString();
if(JOptionPane.showConfirmDialog(null, "Desea Ver detalle?")==0)
            {
                this.jtf_describsubhis.setText(this.jtable_modelo_subfam2.getValueAt(fila, 1).toString());
                this.jtf_invepadrefecha1.setText(this.jtf_invepadrefecha.getText());
                this.carga_datos_reportediferencias2(ftienda,ffoliopadre,2,idcadena);
                this.carga_datos_reportedifxsubhis("1", String.valueOf(ftienda), idcadena);
            }
    }
private void diodblclick3(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
            System.out.println("dio doble  click");
            int fila = jt_repsubfamhistorial.getSelectedRow();
            String idcadena[]=this.jtable_modelo_subfamhis.getValueAt(fila, 0).toString().split(":");
    if(JOptionPane.showConfirmDialog(null, "Desea Ver detalle?")==0)
            {
                this.jtf_describsubhis.setText(this.jtable_modelo_subfamhis.getValueAt(fila, 1).toString());
                this.jtf_invepadrefecha1.setText(this.jtable_modelo_subfamhis.getValueAt(fila, 7).toString());
                this.carga_datos_reportediferencias2(ftienda,Integer.valueOf(idcadena[1]),2,idcadena[0]);

            }
    }

private void dioclickidartifisico(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");
         int fila = jt_inventariofisicodetalle.getSelectedRow();

         String idcadena=null;
          idcadena = jtable_modelo.getValueAt(fila, 0).toString();
        //JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
         if(JOptionPane.showConfirmDialog(null, "Desea ver Articulo?")==0)
        {
            try
            {
                    articulos_sie_editar fase=new articulos_sie_editar(idcadena);
                    fase.pack();
                    fase.setVisible(true);
            }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }

            }


    }
private void dioclicketfoto(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         //System.out.println("dio doble  click");
         int fila = jt_inventariofisicodetalle.getSelectedRow();


         this.jep_articuloimagen1.setText("<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo.getValueAt(fila, 1).toString()+".JPG\" width=\"300\" height=\"160\" border=\"0\" alt=\"Foto Articulo\"></img>");
    }
private void carga_datos_reportediferencias2(int idtienda,int idfoliopadre,int opcion,String textbusqueda)
    {

         DecimalFormat miformat = new DecimalFormat("############.##");
        String htmlabre="<html><BODY>",htmlcierra="</BODY></html>",colorabre="",colorcierra="";
       //invoco al metodo que trae el recordset de datos
       while(jtable_modelo2.getRowCount()>0)jtable_modelo2.removeRow(0);
       //voy por el detalle del documento
       float colexis=0;
       Object[] fnewRow = new Object[8];
       String texto="select * from x1sieuno_articulo_inven_congelar_reportdiferencias("+idtienda+","+idfoliopadre+","+opcion+",'"+textbusqueda+"') as (iddet integer,idfisico integer,clave character varying(16),cantteo numeric,cantfis numeric,observa text,costo numeric,precio numeric,impcostofis numeric,importpreciofis numeric,importcosteo numeric,importprecioteo numeric,cantdif numeric,costodif numeric,preciodif numeric,descripcion character varying(80),familia integer,subfam integer,fechaulti date,tementrada character varying(25),item character varying(80),precio1 numeric,nombrefamilia character varying(30),nombresubfamilia character varying(50),idproducto integer);";
       System.out.println(texto);
        try
        {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("clave");
                        fnewRow[1]=rs.getString("idproducto")+":"+rs.getString("descripcion");
                        fnewRow[2]=rs.getString("item");
                        fnewRow[3]=miformat.format(rs.getFloat("costo"));
                        fnewRow[4]=miformat.format(rs.getFloat("precio"));
                        fnewRow[5]=miformat.format(rs.getFloat("cantteo"));
                        fnewRow[6]=miformat.format(rs.getFloat("cantfis"));
                        colexis=rs.getFloat("cantdif");
                        colorabre="";
                        colorcierra="";
                        if (colexis<0)
                                {
                                    colorabre="<b><font color=#CC0000>";
                                    colorcierra="<font></b>";
                                }
                        if (colexis>0)
                                {
                                    colorabre="<b><font color=\"YELLOW\">";
                                    colorcierra="<font></b>";
                                }
                        fnewRow[7]=htmlabre+colorabre+rs.getFloat("cantdif")+colorcierra+htmlcierra;
                        jtable_modelo2.addRow(fnewRow);
              }
        }
        catch(Exception e)
         {
            System.out.println(e.getMessage());
        }


      }

private void carga_datos_reportedifxsubhis(String opcion, String idtienda,String textobusca)
    {

         DecimalFormat miformat = new DecimalFormat("###,###,###,###");

       //invoco al metodo que trae el recordset de datos
       while(jtable_modelo_subfamhis.getRowCount()>0)jtable_modelo_subfamhis.removeRow(0);
       //voy por el detalle del documento
       Object[] fnewRow = new Object[8];
       String texto="select * from x1sieuno_articulo_inven_congelar_reportdifxsubhisto("+opcion+","+idtienda+",'"+textobusca+"') as (idpadre integer,subfam integer,nombresubfam character varying(50),cantteo numeric,cantfis numeric,importecosfis numeric,importeprefis numeric,importecosteo numeric,importepreteo numeric,cantidaddif numeric,costodif numeric,preciodif numeric,fechaaplico date);";
       System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                        if(rs.getFloat("cantfis")>0)
                        {
                        fnewRow[0]=rs.getString("subfam")+":"+rs.getString("idpadre");
                        fnewRow[1]=rs.getString("nombresubfam");
                        fnewRow[2]=miformat.format(rs.getFloat("cantteo"));
                        fnewRow[3]=miformat.format(rs.getFloat("cantfis"));
                        fnewRow[4]=miformat.format(rs.getFloat("cantidaddif"));
                        fnewRow[5]=miformat.format(rs.getFloat("importecosfis"));
                        fnewRow[6]=miformat.format(rs.getFloat("costodif"));
                        if(rs.getString("fechaaplico")!=null)
                        fnewRow[7]=this.fechaeuropea(rs.getString("fechaaplico"));
                        else
                        fnewRow[7]="";
                        jtable_modelo_subfamhis.addRow(fnewRow);
                        }
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
}

private String fechaamericana(Date fe) {
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("yyyy-MM-dd");
       String cadenafecha="";
       cadenafecha= formateadorestaeuropa.format(fe);
       return cadenafecha;

    }

private String  fechaeuropea(Date fecha) {
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";

       cadenafecha= formateadorestaeuropa.format(fecha);
       return cadenafecha;
    }

  private void imprimir(int pag,float ptotal)
    {
            this.objimpresora=new articulos_sie_invefisico_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir("S.I.  Reporte de Invientario Fisico");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Proveedor:"+this.jtf_describsubhis.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha Inv.:"+this.jtf_invepadrefecha1.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha Impresion:"+this.fechaeuropea(fechahoy)+" Hora: "+fechahoy.getHours()+":"+fechahoy.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jtb_catalogo_articulos1);
     this.objimpresora.imprimir_all(1,pag);
    }
   private void imprimirinventario(int pag,float ptotal)
    {
            this.objimpresora=new articulos_sie_invefisico_imprimir();
    java.util.Date fechahoya=new Date();
     this.objimpresora.setOneItem_cadenas_a_imprimir("          S.I. Reporte de Articulos en Inventario");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Descripcion:"+this.jtf_invepadredescripcion.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Fecha Inv.:"+this.jtf_invepadrefecha.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Fecha Impresion:"+this.fechaeuropea(fechahoya)+" Hora: "+fechahoya.getHours()+":"+fechahoya.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
            this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
if((pag+1)>=ptotal)
        {
                this.objimpresora.setOneItem_cadenas_a_imprimir("          Total de Articulos:"+this.jtf_articuloscantidad.getText());
                this.objimpresora.setOneItem_cadenas_a_imprimir("          Total Existencia Teorica:"+this.jtf_articuloscantidad1.getText());
                this.objimpresora.setOneItem_cadenas_a_imprimir("          Costo Teorico:"+this.jtf_ifcosto.getText());
                this.objimpresora.setOneItem_cadenas_a_imprimir("          Precio Teorico:"+this.jtf_ifprecio.getText());
                this.objimpresora.setOneItem_cadenas_a_imprimir("          Recibio: _");
        }

     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_articuloseninve);
     this.objimpresora.imprimir_all(8,pag);
    }
private void imprimirxsub(int pag,float ptotal)
    {
            this.objimpresora=new articulos_sie_invefisico_imprimir();

    java.util.Date fechahoya=new Date();

     this.objimpresora.setOneItem_cadenas_a_imprimir("S.I.  Reporte de Resumen de Diferencias por subfamilia");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Titulo Inventario:"+this.jtf_invepadredescripcion.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha Inv.:"+this.jtf_invepadrefecha1.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha Impresion:"+this.fechaeuropea(fechahoya)+" Hora: "+fechahoya.getHours()+":"+fechahoya.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_repsubfam1);
     this.objimpresora.imprimir_all(2,pag);
    }
private void imprimirxsubrep(int pag,float ptotal)
    {
     this.objimpresora=new articulos_sie_invefisico_imprimir();

     java.util.Date fechahoya=new Date();

     this.objimpresora.setOneItem_cadenas_a_imprimir("S.I.  Reporte de Resumen de Inventario Fisico");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Titulo Inventario:"+this.jtf_invepadredescripcion.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha Inv.:"+this.jtf_invepadrefecha1.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha Impresion:"+this.fechaeuropea(fechahoya)+" Hora: "+fechahoya.getHours()+":"+fechahoya.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_repsubfam1);
     this.objimpresora.imprimir_all(3,pag);
    }
private void imprimir_resudoc(int pag,float ptotal)
    {
     this.objimpresora=new articulos_sie_invefisico_imprimir();

     java.util.Date fechahoya=new Date();

     this.objimpresora.setOneItem_cadenas_a_imprimir("Reporte de Documentos Inventario Fisico");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Titulo Inventario:"+this.jtf_invepadredescripcion.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha Inv.:"+this.jtf_invepadrefecha1.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha Impresion:"+this.fechaeuropea(fechahoya)+" Hora: "+fechahoya.getHours()+":"+fechahoya.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_catainventarios);
     this.objimpresora.imprimir_all(4,pag);
    }
 private void imprimirdoctodet(int pag,float ptotal)
    {
            this.objimpresora=new articulos_sie_invefisico_imprimir();
    java.util.Date fechahoya=new Date();

     this.objimpresora.setOneItem_cadenas_a_imprimir("            inventario fisico:"+this.jtf_invepadredescripcion.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("            Folio Documento:"+this.jtf_folio.getText()+"  Descripcion:"+this.jtf_descripinventario.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("            Realizo:"+this.jtf_codelabora.getText()+"   Reviso:"+this.jtf_codconfirmaconteo.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("            Fecha Inv.:"+this.jtf_inveactualfecha.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("            Status de Documento:"+this.jtf_inveactualstatus.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("            Fecha Impresion:"+this.fechaeuropea(fechahoya)+" Hora: "+fechahoya.getHours()+":"+fechahoya.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
      this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
      if((pag+1)>=ptotal)
        {
     this.objimpresora.setOneItem_cadenas_a_imprimir("Articulos:"+this.jtf_totalarticulos.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
    
      }

//     this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_inventariofisicodetalle);
     this.objimpresora.imprimir_all(5,pag);
    }

 private void imprimirxfam(int pag,float ptotal)
    {
    this.objimpresora=new articulos_sie_invefisico_imprimir();

    java.util.Date fechahoya=new Date();

     this.objimpresora.setOneItem_cadenas_a_imprimir("Reporte de Resumen de Diferencias por Familia");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Titulo Inventario:"+this.jtf_invepadredescripcion.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha Inv.:"+this.jtf_invepadrefecha1.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha Impresion:"+this.fechaeuropea(fechahoya)+" Hora: "+fechahoya.getHours()+":"+fechahoya.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_repfamilia);
     this.objimpresora.imprimir_all(7,pag);
    }

private void dioclickva(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");

         int fila = jtb_catalogo_articulos1.getSelectedRow();
         String valor[] = jtable_modelo2.getValueAt(fila, 1).toString().split(":");

    if(JOptionPane.showConfirmDialog(null, "Desea Ver detalle?")==0)
        {
            articulos_sie_editar fase=new articulos_sie_editar(valor[0].replaceAll("", ""));
            fase.pack();
            fase.setVisible(true);
        }
        //JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();


        //setVisible(false);
    }

private void dioclickva2(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:

         int filaexis =jtb_catalogo_articulos1.getSelectedRow();
         String valortienda =jtable_modelo2.getValueAt(filaexis, 0).toString();
         this.jtf_invearticulo.setText(jtable_modelo2.getValueAt(filaexis, 1).toString());
         this.jtf_inveclave.setText(jtable_modelo2.getValueAt(filaexis, 0).toString());
         this.carga_articulo_kardex(valortienda, "",this.jtf_tienda.getText());


    }
private void jtb_catalogo_articulosMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
 private void carga_datos_invepadre(int opcion,int idtienda,String busqueda)
    {
     String idtiendastri[]=null;
       String texto="select * from x1sieuno_articulo_inven_programados("+opcion+","+idtienda+",'"+busqueda+"')  as (id integer,idcon smallint,fechaprog date,horaprog text,fechaaplica date,horaaplica text,fecharevi date,idempleelabora integer,idempleasuper integer,idgerente integer,idsuper integer,cantteo numeric,cantfis numeric, descripinve text,observa text,valorcongel smallint,idstatusconge smallint,descrpstatu character varying(40),descripcongela character varying(40),obsercongelar character varying(80),camponombrecongela character varying(25),idmove integer,idmovs integer);";
       System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    this.jcbx_idstatus.addItem(rs.getString ("idstatusconge")+":"+rs.getString ("descrpstatu"));
                    this.jtf_idstatus.setText(rs.getString ("idstatusconge"));
                    idtiendastri=rs.getString ("descripinve").split(":");
                    this.jtf_invepadredescripcion.setText(idtiendastri[2]);
                      System.out.println("dentro de la busqueda");
                   if(rs.getInt("idstatusconge")<3)
                        {
                            if (variables_global.getnivelusu()<3)
                                    {
                                    this.jbtn_congelarexistencias.setVisible(true);

                                    }
                        }
                       if(rs.getInt("idstatusconge")>6)
                        {

                                    this.jbtn_nuevo.setVisible(false);
                                    this.jbtn_genramovextsal.setVisible(false);
                                    this.jbtn_genramovextsal1.setVisible(false);

                        }
                      this.jtf_operosobfol.setText(rs.getString ("idmove"));
                      this.jtf_operofalfol.setText(rs.getString ("idmovs"));
                    
                      if(rs.getInt("idmovs")>0)
                        {
                            this.jbtn_genramovextsal.setVisible(false);
                        }
                      this.jtf_invepadrefecha.setText(this.fechaeuropea(rs.getString ("fechaprog")));
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
}

 private void inventario_padre_actualiza(int opcion,String idtie,String inve,String textolibre)
    {
       //invoco al metodo que trae el recordset de datos
    int encontrado=0;
    String texto ="select * from x1sieuno_articulo_inven_programar_update("+opcion+","+idtie+",'"+inve+"',0,'fecha','descripcion','observacion',0,'"+textolibre+"');";
    System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                     encontrado=rs.getInt(1);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (encontrado==1)
              {
               //JOptionPane.showMessageDialog(null,"Gracias!", "Sistema Integral(Inventarios: Modificacion) : Ayuda",1);

              }
       else
           {
               //JOptionPane.showMessageDialog(null,"Error Documento no Actualizado!", "Sistema Integral(Inventarios: Modificacion) : Ayuda",1);
           }
     }

 private String find_esquema(String idcli)
{
    String esquema="";
     String texto ="select * from x1distribucion_tiendas_activas(5,'"+idcli+"','') as (tie_descri character varying(35),tie_id integer,tie_desesque character varying(25),idclie character varying(12));";
    System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                     esquema=rs.getString("tie_desesque");
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

                                   

return esquema;
}
private void carga_articulo_kardex(String clavepro,String tienda,String idtienda)
        {
            DecimalFormat miformat = new DecimalFormat("############.##");
            ResultSet rs2 = null;
             while(jtable_modelo_kardex.getRowCount()>0)jtable_modelo_kardex.removeRow(0);
            Object[] fnewRow = new Object[5];
            float historial=0,nmovent=0,nmovsal=0,npiezasent=0,npiezassal=0,cantidad=0;
            String abrehtml="",cierrahtml="",htmlcolor="<html><BODY bgcolor=#CC0066><font color=#CC0066>_______________</font></BODY></html>";
            String texto2="select * from x1sieuno_articulo_kardex("+idtienda+",0,0,'"+clavepro+"') as (idserial integer,idmov integer,idtabla character varying(35),idalmpro integer,idcatmovalpro integer,existencia double precision,fecha date,cantidadpro real,precioxproducto double precision,idproducto integer,claveproducto text,nombreentsal text,descripcionmovi text)";
            try
                {
                 rs2 = x.sieuno_executediversosv2(texto2,variables_global.getconexiongral());
                          while (rs2.next())
                            {

                             
                                if(rs2.getFloat("existencia") > historial )//significa que fue entrada
                                    {
                                        nmovent++;
                                        npiezasent+=rs2.getFloat("cantidadpro");
                                        abrehtml="<html><BODY><b>";
                                        cierrahtml="</b></BODY></html>";
                                        cantidad=rs2.getFloat("cantidadpro");
                                    }
                                else
                                    {
                                        nmovsal++;
                                        npiezassal+=rs2.getFloat("cantidadpro");
                                        abrehtml="";
                                        cierrahtml="";
                                         if(rs2.getFloat("cantidadpro")>0)
                                            {
                                                cantidad=rs2.getFloat("cantidadpro")*-1;
                                            }
                                        else
                                            {
                                                cantidad=rs2.getFloat("cantidadpro");
                                            }
                                        System.out.println(rs2.getFloat("cantidadpro")+" revision de negativos");    
                                    }
                                        fnewRow[0]=abrehtml+this.fechaeuropea(rs2.getString ("fecha"))+cierrahtml;
                                        fnewRow[1]=abrehtml+rs2.getString ("idcatmovalpro")+":"+rs2.getString ("descripcionmovi")+cierrahtml;
                                        fnewRow[2]=abrehtml+miformat.format(rs2.getFloat("precioxproducto"))+cierrahtml;
                                        fnewRow[3]=abrehtml+miformat.format(cantidad)+cierrahtml;
                                        fnewRow[4]=abrehtml+rs2.getString ("existencia")+cierrahtml;

                                historial=rs2.getFloat("existencia");
                                jtable_modelo_kardex.addRow(fnewRow);
                            
                         }//cierra el while
                }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }

                    fnewRow[0]=htmlcolor;
                    fnewRow[1]=htmlcolor;
                    fnewRow[2]=htmlcolor;
                    fnewRow[3]=htmlcolor;
                    fnewRow[4]=htmlcolor;
                    jtable_modelo_kardex.addRow(fnewRow);
                     if(nmovent  > 0 )
                                    {
                                        fnewRow[0]="";
                                        fnewRow[1]="Totales";
                                        fnewRow[2]="<html><BODY><b>"+"Entrada="+miformat.format(nmovent)+"</b></BODY></html>";
                                        fnewRow[3]="<html><BODY><b>"+"Piezas="+miformat.format(npiezasent)+"</b></BODY></html>";
                                        fnewRow[4]="";
                                        jtable_modelo_kardex.addRow(fnewRow);
                                    }
                     if(nmovsal  > 0 )
                                    {
                                        fnewRow[0]="";
                                        fnewRow[1]="Totales";
                                        fnewRow[2]="<html><BODY><b>"+"Salidas="+miformat.format(nmovsal)+"</b></BODY></html>";
                                        fnewRow[3]="<html><BODY><b>"+"Piezas="+miformat.format(npiezassal*-1)+"</b></BODY></html>";
                                        fnewRow[4]="";
                                        jtable_modelo_kardex.addRow(fnewRow);
                                    }


     }

private void find_textoenjtable(int columna,int filainicio,String texto)
    {
        
       int totalfilasreporte=this.jtable_modelo2.getRowCount(),i=0,encontro=0,coincidencias=0,columnaanterior=0;
       String cadenaobtenida="";
         //genero los totales por tienda
        for(i=0;i<totalfilasreporte;i++)
            {
                cadenaobtenida=jtable_modelo2.getValueAt(i, columnaanterior).toString().replace("<html><BODY bgcolor=#CC0066>", "").replace("</BODY></html>","");
                jtable_modelo2.setValueAt(cadenaobtenida, i,columnaanterior);
            }
       for(i=0;i<totalfilasreporte;i++)
            {
                cadenaobtenida=jtable_modelo2.getValueAt(i, columna).toString();
                encontro=cadenaobtenida.indexOf(texto);
                if(encontro!=-1)
                    {
                        System.out.println(cadenaobtenida+" en pocicion "+i);
                        this.jtb_catalogo_articulos1.changeSelection(i, 0, true, false);
                        jtable_modelo2.setValueAt("<html><BODY bgcolor=#CC0066>"+cadenaobtenida+"</BODY></html>", i,columna);
                        encontro=-1;
                        coincidencias++;
                    }
            }
        columnaanterior=columna;
            this.jLabel24.setText("Resultado:"+this.jtf_inveclave1.getText()+"="+coincidencias);

    }

private void find_textoenjtable2(int columna,int filainicio,String texto)
    {

       int totalfilasreporte=this.jtable_modelo_diferencias.getRowCount(),i=0,encontro=0,coincidencias=0,columnaanterior=2;
       String cadenaobtenida="";
         //genero los totales por tienda
        for(i=0;i<totalfilasreporte;i++)
            {
                cadenaobtenida=jtable_modelo_diferencias.getValueAt(i, columnaanterior).toString().replace("<html><BODY bgcolor=#CC0066>", "").replace("</BODY></html>","");
                jtable_modelo_diferencias.setValueAt(cadenaobtenida, i,columnaanterior);
            }
       for(i=0;i<totalfilasreporte;i++)
            {
                cadenaobtenida=jtable_modelo_diferencias.getValueAt(i, columna).toString();
                encontro=cadenaobtenida.indexOf(texto);
                if(encontro!=-1)
                    {
                        System.out.println(cadenaobtenida+" en pocicion "+i);
                        this.jtb_catalogo_articulos.changeSelection(i, 0, true, false);
                        jtable_modelo_diferencias.setValueAt("<html><BODY bgcolor=#CC0066>"+cadenaobtenida+"</BODY></html>", i,columna);
                        encontro=-1;
                        coincidencias++;
                    }
            }
        columnaanterior=columna;
            this.jLabel24.setText("Resultado:"+this.jtf_inveclave1.getText()+"="+coincidencias);

    }

 private String  fechaamericana(String fecha) {

         //resibe cadena de fecha en formato americano dd-MM-yyyy
        java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaamericano = new SimpleDateFormat("yyyy-MM-dd");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateador.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaamericano.format(fechaestaeuropa);
       return cadenafecha;

    }

  private void exportar_archivoxtienda()
    {
        FileWriter fichero = null;
        PrintWriter pw = null;
        Object jtunidad=JOptionPane.showInputDialog(null,"Ingresa Unidad:","Unidades",JOptionPane.QUESTION_MESSAGE,null,new Object[] { "C", "D", "E","F","G","H" },"C");
        System.out.println("Esta es la Unidad:"+jtunidad.toString());
        String texto="select * from x1distribucion_terminados_articulos_catalogo(15,1,'') as (id character varying(16),idstatus smallint,statusdescribe character varying(40),describearticulo character varying(80),describcorta character varying(20),unsal character varying(3),unent character varying(3),facentruni numeric,uniempaque character varying(12),idtempo smallint,describetemp character varying(40),idfamilia character varying(5),familiadescribe character varying(40),controlalma character varying(20),stocminimo numeric,stocmaximo numeric,precio1 numeric,perecio2 numeric,precio3 numeric,precio4 numeric,precio5 numeric,ultimocosto numeric,costoprom numeric,pensurtir numeric,tiemposurtido smallint,acumprod numeric,acumimporte numeric,idtipoarticulo smallint,tipodescribe character varying(40),fechaprototipo date,fechaautoriza date,fechainiprod date,fechaultimaent date,usuario character varying(20),observacion character varying(255),idprovee character varying(12),nombrecreador character varying(80),valor_x character varying(20),valorx_st character varying(20),idpersonal character varying(16),nombrepersonal character varying(80),descripprovee character varying(60))",anterior="";
        try
        {
            fichero = new FileWriter(jtunidad.toString()+":/Inventariofisico.csv");
            pw = new PrintWriter(fichero);
             pw.println("Familia,Sub_Familia,id,Clave,barra,descripcion,costo,precio,Exi.Teorica,Exi.Fisica,Diferenca");
                for(int ii=0;ii<this.jtable_modelo_Articeninve.getRowCount();ii++)
                {
                     pw.println(this.jtable_modelo_Articeninve.getValueAt(ii, 1).toString().replace(",", "")+","+this.jtable_modelo_Articeninve.getValueAt(ii, 2).toString().replace(",", "")+","+this.jtable_modelo_Articeninve.getValueAt(ii, 3).toString()+","+this.jtable_modelo_Articeninve.getValueAt(ii, 4).toString()+","+this.jtable_modelo_Articeninve.getValueAt(ii, 12).toString()+","+this.jtable_modelo_Articeninve.getValueAt(ii, 5).toString().replace(",", "")+","+this.jtable_modelo_Articeninve.getValueAt(ii, 7).toString()+","+this.jtable_modelo_Articeninve.getValueAt(ii, 8).toString()+","+this.jtable_modelo_Articeninve.getValueAt(ii, 9).toString()+","+this.jtable_modelo_Articeninve.getValueAt(ii, 10).toString()+","+this.jtable_modelo_Articeninve.getValueAt(ii, 11).toString());
                }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
           try {
           // Nuevamente aprovechamos el finally para
           // asegurarnos que se cierra el fichero.
           if (null != fichero)
              fichero.close();
                JOptionPane.showMessageDialog(null,"Archivo correcto "+jtunidad.toString()+":/Inventariofisico.csv", "Sistema Integral(Catalogo de Articulos)",1);
           } catch (Exception e2) {
              e2.printStackTrace();
           }
        }
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel6 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane19 = new javax.swing.JScrollPane();
        jep_articuloimagen1 = new javax.swing.JEditorPane();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jtf_codigo = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jtf_cantidad = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jtf_folio = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        jtf_codigoinve_observa = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jtf_ultimocodigo = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jft_ultimodescripcion = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jtf_ultimoprecio = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jtf_canactual = new javax.swing.JTextField();
        jtf_cananterior = new javax.swing.JTextField();
        jLabel40 = new javax.swing.JLabel();
        jtf_ultimoprecioreb = new javax.swing.JTextField();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jt_inventariofisicodetalle = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jtf_totalpiezas = new javax.swing.JTextField();
        jtf_totalarticulos = new javax.swing.JTextField();
        jbtn_cerrardocto = new javax.swing.JButton();
        jbtn_autorizarinventario = new javax.swing.JButton();
        jbtn_agregarainvecongelado = new javax.swing.JButton();
        jbtn_nuevo = new javax.swing.JButton();
        jbtn_cancelar = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jtf_idinve = new javax.swing.JTextField();
        jtf_tienda = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jtf_descripinventario = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        jtf_codelabora = new javax.swing.JTextField();
        jtf_idelabora = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jtf_codconfirmaconteo = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jtf_fecha = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        jtf_horainicio = new javax.swing.JTextField();
        jtf_idconfirma = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jtf_fecharevisa = new javax.swing.JTextField();
        jbtn_crearinvedetalle = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jt_catainventarios = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jPanel1 = new javax.swing.JPanel();
        jPanel13 = new javax.swing.JPanel();
        jScrollPane7 = new javax.swing.JScrollPane();
        jt_eninvefamilia = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jcbx_idstatus = new javax.swing.JComboBox();
        jLabel4 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jtf_invepadredescripcion = new javax.swing.JTextField();
        jbtn_invepadreactualizar = new javax.swing.JButton();
        jLabel21 = new javax.swing.JLabel();
        jtf_invepadrefecha = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        jtf_idstatus = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jPanel14 = new javax.swing.JPanel();
        jScrollPane8 = new javax.swing.JScrollPane();
        jt_eninvesfamilia = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jPanel15 = new javax.swing.JPanel();
        jScrollPane9 = new javax.swing.JScrollPane();
        jt_articuloseninve = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jtf_inveactualstatus = new javax.swing.JTextField();
        jtf_inveactualfecha = new javax.swing.JTextField();
        jLabel32 = new javax.swing.JLabel();
        jtf_articuloscantidad = new javax.swing.JTextField();
        jbtn_imprimirteorico = new javax.swing.JButton();
        jLabel33 = new javax.swing.JLabel();
        jtf_articuloscantidad1 = new javax.swing.JTextField();
        jtf_pagini = new javax.swing.JTextField();
        jtf_pagfin = new javax.swing.JTextField();
        jtf_articuloscantidadf = new javax.swing.JTextField();
        jLabel34 = new javax.swing.JLabel();
        jButton4 = new javax.swing.JButton();
        jtf_ifprecio = new javax.swing.JTextField();
        jtf_ifcosto = new javax.swing.JTextField();
        jPanel8 = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jt_repsubfam = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jPanel11 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jtb_catalogo_articulos = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jScrollPane10 = new javax.swing.JScrollPane();
        jtb_catalogo_historialfisico = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jrbtn_ambos = new javax.swing.JRadioButton();
        jrbtn_faltante = new javax.swing.JRadioButton();
        jrbtn_sobrante = new javax.swing.JRadioButton();
        jtf_subfamactual = new javax.swing.JTextField();
        jScrollPane11 = new javax.swing.JScrollPane();
        jep_articuloimagen = new javax.swing.JEditorPane();
        jbtn_agregar = new javax.swing.JButton();
        jtf_inveclave2 = new javax.swing.JTextField();
        jPanel12 = new javax.swing.JPanel();
        jScrollPane6 = new javax.swing.JScrollPane();
        jt_repfamilia = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jbtn_reporte = new javax.swing.JButton();
        jbtn_congelarexistencias = new javax.swing.JButton();
        jCheckBox1 = new javax.swing.JCheckBox();
        jlbl_historial = new javax.swing.JLabel();
        jPanel9 = new javax.swing.JPanel();
        jPanel19 = new javax.swing.JPanel();
        jScrollPane14 = new javax.swing.JScrollPane();
        jt_repsubfam1 = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jPanel20 = new javax.swing.JPanel();
        jScrollPane15 = new javax.swing.JScrollPane();
        jt_repsubfamhistorial = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jPanel21 = new javax.swing.JPanel();
        jScrollPane16 = new javax.swing.JScrollPane();
        jtb_catalogo_articulos1 = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jLabel22 = new javax.swing.JLabel();
        jtf_describsubhis = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        jtf_invepadrefecha1 = new javax.swing.JTextField();
        jButton2 = new javax.swing.JButton();
        jtf_inveclave1 = new javax.swing.JTextField();
        jLabel24 = new javax.swing.JLabel();
        jPanel22 = new javax.swing.JPanel();
        jScrollPane17 = new javax.swing.JScrollPane();
        jtbl_kardex1 = new javax.swing.JTable(){
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }}
            ;
            jtf_invearticulo = new javax.swing.JTextField();
            jtf_inveclave = new javax.swing.JTextField();
            jPanel16 = new javax.swing.JPanel();
            jPanel17 = new javax.swing.JPanel();
            jScrollPane12 = new javax.swing.JScrollPane();
            jt_sobrantes = new javax.swing.JTable(){
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    //if (mColIndex < 6)
                    return false;
                    //else
                    //return true;
                }
            }
            ;
            jLabel26 = new javax.swing.JLabel();
            jtf_importesob = new javax.swing.JTextField();
            jLabel30 = new javax.swing.JLabel();
            jtf_operosobfol = new javax.swing.JTextField();
            jcb_verfotos1 = new javax.swing.JCheckBox();
            jtf_deletefila = new javax.swing.JTextField();
            jLabel29 = new javax.swing.JLabel();
            jtf_importefal2 = new javax.swing.JTextField();
            jLabel38 = new javax.swing.JLabel();
            jtf_importefal3 = new javax.swing.JTextField();
            jPanel18 = new javax.swing.JPanel();
            jScrollPane13 = new javax.swing.JScrollPane();
            jt_faltantes = new javax.swing.JTable(){
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    //if (mColIndex < 6)
                    return false;
                    //else
                    //return true;
                }
            }
            ;
            jLabel27 = new javax.swing.JLabel();
            jtf_importefal = new javax.swing.JTextField();
            jLabel31 = new javax.swing.JLabel();
            jtf_operofalfol = new javax.swing.JTextField();
            jcb_verfotos2 = new javax.swing.JCheckBox();
            jtf_deletefila1 = new javax.swing.JTextField();
            jLabel28 = new javax.swing.JLabel();
            jtf_importefal1 = new javax.swing.JTextField();
            jLabel39 = new javax.swing.JLabel();
            jtf_importefal4 = new javax.swing.JTextField();
            jbtn_genramovextsal = new javax.swing.JButton();
            jbtn_genramovextsal1 = new javax.swing.JButton();
            jPanel23 = new javax.swing.JPanel();
            jPanel24 = new javax.swing.JPanel();
            jLabel35 = new javax.swing.JLabel();
            jdc_fechainicial = new com.toedter.calendar.JDateChooser();
            jLabel36 = new javax.swing.JLabel();
            jdc_fechafinal = new com.toedter.calendar.JDateChooser();
            jbtn_generarreporte = new javax.swing.JButton();
            jLabel37 = new javax.swing.JLabel();
            jScrollPane18 = new javax.swing.JScrollPane();
            jt_repsubfam2 = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jbtn_generarreporte1 = new javax.swing.JButton();
            jbtn_generarreporte2 = new javax.swing.JButton();
            jbtn_generarreporte3 = new javax.swing.JButton();
            jPanel25 = new javax.swing.JPanel();
            jScrollPane3 = new javax.swing.JScrollPane();
            jta_archivo = new javax.swing.JTextArea();
            jLabel3 = new javax.swing.JLabel();
            jbtn_importar = new javax.swing.JButton();
            jMenuBar1 = new javax.swing.JMenuBar();
            jMenu1 = new javax.swing.JMenu();
            jmni_salir = new javax.swing.JMenuItem();
            jMenu2 = new javax.swing.JMenu();
            jmni_quitarpieza = new javax.swing.JMenuItem();
            jmni_actualizar = new javax.swing.JMenuItem();
            jmni_escape = new javax.swing.JMenuItem();
            jmni_congelarexistencia = new javax.swing.JMenuItem();
            jmni_subfamilia = new javax.swing.JMenuItem();
            jmni_familia = new javax.swing.JMenuItem();
            jmni_imprimirdifdet = new javax.swing.JMenuItem();
            jMenuItem1 = new javax.swing.JMenuItem();
            jMenuItem2 = new javax.swing.JMenuItem();
            jMenuItem3 = new javax.swing.JMenuItem();
            jmni_todosdoctos = new javax.swing.JMenuItem();
            jMenuItem4 = new javax.swing.JMenuItem();
            jMenu3 = new javax.swing.JMenu();
            jmni_utilerias = new javax.swing.JMenu();
            jMenuItem5 = new javax.swing.JMenuItem();
            jmni_verinvfis = new javax.swing.JMenuItem();
            jMenuItem6 = new javax.swing.JMenuItem();

            setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
            org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sie_invdis.Sie_invdisApp.class).getContext().getResourceMap(articulos_sie_invefisicodetalle.class);
            setTitle(resourceMap.getString("Form.title")); // NOI18N
            setName("Form"); // NOI18N

            jTabbedPane1.setName("jTabbedPane1"); // NOI18N
            jTabbedPane1.addChangeListener(new javax.swing.event.ChangeListener() {
                public void stateChanged(javax.swing.event.ChangeEvent evt) {
                    jTabbedPane1StateChanged(evt);
                }
            });

            jPanel6.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
            jPanel6.setName("jPanel6"); // NOI18N

            jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel5.border.title"))); // NOI18N
            jPanel5.setName("jPanel5"); // NOI18N

            jScrollPane19.setName("jScrollPane19"); // NOI18N

            jep_articuloimagen1.setContentType(resourceMap.getString("jep_articuloimagen1.contentType")); // NOI18N
            jep_articuloimagen1.setName("jep_articuloimagen1"); // NOI18N
            jScrollPane19.setViewportView(jep_articuloimagen1);

            javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
            jPanel5.setLayout(jPanel5Layout);
            jPanel5Layout.setHorizontalGroup(
                jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane19, javax.swing.GroupLayout.DEFAULT_SIZE, 311, Short.MAX_VALUE)
            );
            jPanel5Layout.setVerticalGroup(
                jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane19, javax.swing.GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE)
            );

            jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel2.border.title"))); // NOI18N
            jPanel2.setName("jPanel2"); // NOI18N

            jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
            jLabel1.setName("jLabel1"); // NOI18N

            jtf_codigo.setText(resourceMap.getString("jtf_codigo.text")); // NOI18N
            jtf_codigo.setToolTipText(resourceMap.getString("jtf_codigo.toolTipText")); // NOI18N
            jtf_codigo.setName("jtf_codigo"); // NOI18N
            jtf_codigo.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_codigoActionPerformed(evt);
                }
            });

            jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
            jLabel2.setName("jLabel2"); // NOI18N

            jtf_cantidad.setEditable(false);
            jtf_cantidad.setText(resourceMap.getString("jtf_cantidad.text")); // NOI18N
            jtf_cantidad.setName("jtf_cantidad"); // NOI18N

            jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
            jLabel5.setName("jLabel5"); // NOI18N

            jtf_folio.setEditable(false);
            jtf_folio.setText(resourceMap.getString("jtf_folio.text")); // NOI18N
            jtf_folio.setName("jtf_folio"); // NOI18N

            jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
            jLabel20.setName("jLabel20"); // NOI18N

            jtf_codigoinve_observa.setText(resourceMap.getString("jtf_codigoinve_observa.text")); // NOI18N
            jtf_codigoinve_observa.setToolTipText(resourceMap.getString("jtf_codigoinve_observa.toolTipText")); // NOI18N
            jtf_codigoinve_observa.setName("jtf_codigoinve_observa"); // NOI18N
            jtf_codigoinve_observa.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_codigoinve_observaActionPerformed(evt);
                }
            });

            javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
            jPanel2.setLayout(jPanel2Layout);
            jPanel2Layout.setHorizontalGroup(
                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jLabel2)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_cantidad, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel20))
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addGap(12, 12, 12)
                            .addComponent(jLabel5)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_folio, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(4, 4, 4)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jtf_codigo, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_codigoinve_observa, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE))
                    .addContainerGap())
            );
            jPanel2Layout.setVerticalGroup(
                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel1)
                        .addComponent(jLabel5)
                        .addComponent(jtf_folio, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_codigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel2)
                        .addComponent(jtf_cantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel20)
                        .addComponent(jtf_codigoinve_observa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap())
            );

            jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel3.border.title"))); // NOI18N
            jPanel3.setName("jPanel3"); // NOI18N

            jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
            jLabel6.setName("jLabel6"); // NOI18N

            jtf_ultimocodigo.setEditable(false);
            jtf_ultimocodigo.setFont(resourceMap.getFont("jtf_ultimocodigo.font")); // NOI18N
            jtf_ultimocodigo.setText(resourceMap.getString("jtf_ultimocodigo.text")); // NOI18N
            jtf_ultimocodigo.setName("jtf_ultimocodigo"); // NOI18N

            jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
            jLabel7.setName("jLabel7"); // NOI18N

            jft_ultimodescripcion.setEditable(false);
            jft_ultimodescripcion.setFont(resourceMap.getFont("jft_ultimodescripcion.font")); // NOI18N
            jft_ultimodescripcion.setText(resourceMap.getString("jft_ultimodescripcion.text")); // NOI18N
            jft_ultimodescripcion.setName("jft_ultimodescripcion"); // NOI18N

            jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
            jLabel8.setName("jLabel8"); // NOI18N

            jtf_ultimoprecio.setEditable(false);
            jtf_ultimoprecio.setFont(resourceMap.getFont("jtf_ultimoprecio.font")); // NOI18N
            jtf_ultimoprecio.setText(resourceMap.getString("jtf_ultimoprecio.text")); // NOI18N
            jtf_ultimoprecio.setName("jtf_ultimoprecio"); // NOI18N

            jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
            jLabel9.setName("jLabel9"); // NOI18N

            jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
            jLabel10.setName("jLabel10"); // NOI18N

            jtf_canactual.setEditable(false);
            jtf_canactual.setFont(resourceMap.getFont("jtf_canactual.font")); // NOI18N
            jtf_canactual.setText(resourceMap.getString("jtf_canactual.text")); // NOI18N
            jtf_canactual.setName("jtf_canactual"); // NOI18N

            jtf_cananterior.setEditable(false);
            jtf_cananterior.setFont(resourceMap.getFont("jtf_cananterior.font")); // NOI18N
            jtf_cananterior.setText(resourceMap.getString("jtf_cananterior.text")); // NOI18N
            jtf_cananterior.setName("jtf_cananterior"); // NOI18N

            jLabel40.setText(resourceMap.getString("jLabel40.text")); // NOI18N
            jLabel40.setName("jLabel40"); // NOI18N

            jtf_ultimoprecioreb.setEditable(false);
            jtf_ultimoprecioreb.setFont(resourceMap.getFont("jtf_ultimoprecioreb.font")); // NOI18N
            jtf_ultimoprecioreb.setName("jtf_ultimoprecioreb"); // NOI18N

            javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
            jPanel3.setLayout(jPanel3Layout);
            jPanel3Layout.setHorizontalGroup(
                jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addComponent(jLabel9)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_canactual, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jLabel10)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_cananterior, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addComponent(jtf_ultimocodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel8)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_ultimoprecio, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jLabel40)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_ultimoprecioreb, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jft_ultimodescripcion)))
            );
            jPanel3Layout.setVerticalGroup(
                jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_ultimocodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel6)
                        .addComponent(jtf_ultimoprecio, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel8)
                        .addComponent(jLabel40)
                        .addComponent(jtf_ultimoprecioreb, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addGap(20, 20, 20)
                            .addComponent(jLabel7))
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jft_ultimodescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jLabel9)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jtf_canactual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtf_cananterior, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel10))))
            );

            jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel4.border.title"))); // NOI18N
            jPanel4.setName("jPanel4"); // NOI18N

            jScrollPane1.setName("jScrollPane1"); // NOI18N

            jt_inventariofisicodetalle.setModel(this.jtable_modelo);
            jt_inventariofisicodetalle.setName("jt_inventariofisicodetalle"); // NOI18N
            jt_inventariofisicodetalle.setRowHeight(26);
            jt_inventariofisicodetalle.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_inventariofisicodetalleMouseClicked(evt);

                    if(evt.getClickCount() >= 1)
                    {
                        dioclicketfoto(evt);
                        //System.out.println(" double click" );

                    }
                    if(evt.getClickCount() >= 2)
                    {
                        dioclickidartifisico(evt);
                        //System.out.println(" double click" );

                    }
                }
            });
            jScrollPane1.setViewportView(jt_inventariofisicodetalle);

            jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
            jLabel11.setName("jLabel11"); // NOI18N

            jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
            jLabel12.setName("jLabel12"); // NOI18N

            jtf_totalpiezas.setEditable(false);
            jtf_totalpiezas.setFont(resourceMap.getFont("jtf_totalpiezas.font")); // NOI18N
            jtf_totalpiezas.setText(resourceMap.getString("jtf_totalpiezas.text")); // NOI18N
            jtf_totalpiezas.setName("jtf_totalpiezas"); // NOI18N

            jtf_totalarticulos.setEditable(false);
            jtf_totalarticulos.setFont(resourceMap.getFont("jtf_totalarticulos.font")); // NOI18N
            jtf_totalarticulos.setText(resourceMap.getString("jtf_totalarticulos.text")); // NOI18N
            jtf_totalarticulos.setName("jtf_totalarticulos"); // NOI18N

            jbtn_cerrardocto.setIcon(resourceMap.getIcon("jbtn_cerrardocto.icon")); // NOI18N
            jbtn_cerrardocto.setText(resourceMap.getString("jbtn_cerrardocto.text")); // NOI18N
            jbtn_cerrardocto.setToolTipText(resourceMap.getString("jbtn_cerrardocto.toolTipText")); // NOI18N
            jbtn_cerrardocto.setName("jbtn_cerrardocto"); // NOI18N
            jbtn_cerrardocto.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_cerrardoctoActionPerformed(evt);
                }
            });

            jbtn_autorizarinventario.setIcon(resourceMap.getIcon("jbtn_autorizarinventario.icon")); // NOI18N
            jbtn_autorizarinventario.setText(resourceMap.getString("jbtn_autorizarinventario.text")); // NOI18N
            jbtn_autorizarinventario.setToolTipText(resourceMap.getString("jbtn_autorizarinventario.toolTipText")); // NOI18N
            jbtn_autorizarinventario.setName("jbtn_autorizarinventario"); // NOI18N
            jbtn_autorizarinventario.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_autorizarinventarioActionPerformed(evt);
                }
            });

            jbtn_agregarainvecongelado.setIcon(resourceMap.getIcon("jbtn_agregarainvecongelado.icon")); // NOI18N
            jbtn_agregarainvecongelado.setText(resourceMap.getString("jbtn_agregarainvecongelado.text")); // NOI18N
            jbtn_agregarainvecongelado.setToolTipText(resourceMap.getString("jbtn_agregarainvecongelado.toolTipText")); // NOI18N
            jbtn_agregarainvecongelado.setName("jbtn_agregarainvecongelado"); // NOI18N
            jbtn_agregarainvecongelado.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_agregarainvecongeladoActionPerformed(evt);
                }
            });

            jbtn_nuevo.setIcon(resourceMap.getIcon("jbtn_nuevo.icon")); // NOI18N
            jbtn_nuevo.setText(resourceMap.getString("jbtn_nuevo.text")); // NOI18N
            jbtn_nuevo.setToolTipText(resourceMap.getString("jbtn_nuevo.toolTipText")); // NOI18N
            jbtn_nuevo.setName("jbtn_nuevo"); // NOI18N
            jbtn_nuevo.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_nuevoActionPerformed(evt);
                }
            });

            jbtn_cancelar.setIcon(resourceMap.getIcon("jbtn_cancelar.icon")); // NOI18N
            jbtn_cancelar.setText(resourceMap.getString("jbtn_cancelar.text")); // NOI18N
            jbtn_cancelar.setToolTipText(resourceMap.getString("jbtn_cancelar.toolTipText")); // NOI18N
            jbtn_cancelar.setName("jbtn_cancelar"); // NOI18N
            jbtn_cancelar.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_cancelarActionPerformed(evt);
                }
            });

            jButton3.setIcon(resourceMap.getIcon("jButton3.icon")); // NOI18N
            jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
            jButton3.setName("jButton3"); // NOI18N
            jButton3.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton3ActionPerformed(evt);
                }
            });

            jtf_idinve.setEditable(false);
            jtf_idinve.setText(resourceMap.getString("jtf_idinve.text")); // NOI18N
            jtf_idinve.setName("jtf_idinve"); // NOI18N

            jtf_tienda.setEditable(false);
            jtf_tienda.setText(resourceMap.getString("jtf_tienda.text")); // NOI18N
            jtf_tienda.setName("jtf_tienda"); // NOI18N

            jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
            jLabel16.setName("jLabel16"); // NOI18N

            jtf_descripinventario.setText(resourceMap.getString("jtf_descripinventario.text")); // NOI18N
            jtf_descripinventario.setToolTipText(resourceMap.getString("jtf_descripinventario.toolTipText")); // NOI18N
            jtf_descripinventario.setName("jtf_descripinventario"); // NOI18N
            jtf_descripinventario.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_descripinventarioActionPerformed(evt);
                }
            });

            jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
            jLabel14.setName("jLabel14"); // NOI18N

            jtf_codelabora.setText(resourceMap.getString("jtf_codelabora.text")); // NOI18N
            jtf_codelabora.setToolTipText(resourceMap.getString("jtf_codelabora.toolTipText")); // NOI18N
            jtf_codelabora.setName("jtf_codelabora"); // NOI18N
            jtf_codelabora.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_codelaboraActionPerformed(evt);
                }
            });

            jtf_idelabora.setEditable(false);
            jtf_idelabora.setText(resourceMap.getString("jtf_idelabora.text")); // NOI18N
            jtf_idelabora.setName("jtf_idelabora"); // NOI18N

            jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
            jLabel15.setName("jLabel15"); // NOI18N

            jtf_codconfirmaconteo.setText(resourceMap.getString("jtf_codconfirmaconteo.text")); // NOI18N
            jtf_codconfirmaconteo.setToolTipText(resourceMap.getString("jtf_codconfirmaconteo.toolTipText")); // NOI18N
            jtf_codconfirmaconteo.setName("jtf_codconfirmaconteo"); // NOI18N
            jtf_codconfirmaconteo.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_codconfirmaconteoActionPerformed(evt);
                }
            });

            jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
            jLabel18.setName("jLabel18"); // NOI18N

            jtf_fecha.setEditable(false);
            jtf_fecha.setText(resourceMap.getString("jtf_fecha.text")); // NOI18N
            jtf_fecha.setName("jtf_fecha"); // NOI18N

            jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
            jLabel17.setName("jLabel17"); // NOI18N

            jtf_horainicio.setEditable(false);
            jtf_horainicio.setText(resourceMap.getString("jtf_horainicio.text")); // NOI18N
            jtf_horainicio.setToolTipText(resourceMap.getString("jtf_horainicio.toolTipText")); // NOI18N
            jtf_horainicio.setName("jtf_horainicio"); // NOI18N

            jtf_idconfirma.setEditable(false);
            jtf_idconfirma.setText(resourceMap.getString("jtf_idconfirma.text")); // NOI18N
            jtf_idconfirma.setName("jtf_idconfirma"); // NOI18N

            jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
            jLabel19.setName("jLabel19"); // NOI18N

            jtf_fecharevisa.setEditable(false);
            jtf_fecharevisa.setText(resourceMap.getString("jtf_fecharevisa.text")); // NOI18N
            jtf_fecharevisa.setName("jtf_fecharevisa"); // NOI18N

            jbtn_crearinvedetalle.setText(resourceMap.getString("jbtn_crearinvedetalle.text")); // NOI18N
            jbtn_crearinvedetalle.setName("jbtn_crearinvedetalle"); // NOI18N
            jbtn_crearinvedetalle.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_crearinvedetalleActionPerformed(evt);
                }
            });

            javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
            jPanel4.setLayout(jPanel4Layout);
            jPanel4Layout.setHorizontalGroup(
                jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel4Layout.createSequentialGroup()
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel4Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jLabel11)
                            .addGap(2, 2, 2)
                            .addComponent(jtf_totalarticulos, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel12)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jtf_totalpiezas, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(jbtn_nuevo)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jbtn_cancelar))
                        .addGroup(jPanel4Layout.createSequentialGroup()
                            .addComponent(jbtn_autorizarinventario)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jbtn_cerrardocto)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jbtn_agregarainvecongelado)
                            .addGap(18, 18, 18)
                            .addComponent(jButton3)))
                    .addContainerGap())
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE)
                .addGroup(jPanel4Layout.createSequentialGroup()
                    .addComponent(jtf_idinve, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_tienda, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel16)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_descripinventario, javax.swing.GroupLayout.PREFERRED_SIZE, 455, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(25, Short.MAX_VALUE))
                .addGroup(jPanel4Layout.createSequentialGroup()
                    .addComponent(jLabel14)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_codelabora, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_idelabora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel15)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_codconfirmaconteo, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel18)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_fecha, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel17)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_horainicio, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(jtf_idconfirma, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(4, 4, 4))
                .addGroup(jPanel4Layout.createSequentialGroup()
                    .addComponent(jLabel19)
                    .addGap(28, 28, 28)
                    .addComponent(jtf_fecharevisa, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jbtn_crearinvedetalle)
                    .addContainerGap())
            );
            jPanel4Layout.setVerticalGroup(
                jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel4Layout.createSequentialGroup()
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_idinve, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_tienda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel16)
                        .addComponent(jtf_descripinventario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_codelabora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel14)
                        .addComponent(jtf_idelabora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_codconfirmaconteo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel15)
                        .addComponent(jtf_fecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel18)
                        .addComponent(jLabel17)
                        .addComponent(jtf_horainicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_idconfirma, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(9, 9, 9)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_fecharevisa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jbtn_crearinvedetalle)
                        .addComponent(jLabel19))
                    .addGap(18, 18, 18)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel12)
                        .addComponent(jtf_totalpiezas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_totalarticulos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jbtn_nuevo)
                        .addComponent(jLabel11)
                        .addComponent(jbtn_cancelar))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jbtn_autorizarinventario)
                        .addComponent(jbtn_cerrardocto)
                        .addComponent(jbtn_agregarainvecongelado)
                        .addComponent(jButton3))
                    .addGap(25, 25, 25))
            );

            jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel7.border.title"))); // NOI18N
            jPanel7.setName("jPanel7"); // NOI18N

            jScrollPane2.setName("jScrollPane2"); // NOI18N

            jt_catainventarios.setModel(this.jtable_modelo_catalogo);
            jt_catainventarios.setName("jt_catainventarios"); // NOI18N
            jt_catainventarios.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_catainventariosMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclick(evt);
                        //System.out.println(" double click" );

                    }
                }
            });
            jScrollPane2.setViewportView(jt_catainventarios);

            javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
            jPanel7.setLayout(jPanel7Layout);
            jPanel7Layout.setHorizontalGroup(
                jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel7Layout.createSequentialGroup()
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
                    .addContainerGap())
            );
            jPanel7Layout.setVerticalGroup(
                jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
            );

            javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
            jPanel6.setLayout(jPanel6Layout);
            jPanel6Layout.setHorizontalGroup(
                jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel6Layout.createSequentialGroup()
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel6Layout.createSequentialGroup()
                            .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jPanel5, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap())
            );
            jPanel6Layout.setVerticalGroup(
                jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel6Layout.createSequentialGroup()
                    .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                            .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 430, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap())
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel6.TabConstraints.tabTitle"), jPanel6); // NOI18N

            jPanel1.setName("jPanel1"); // NOI18N

            jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel13.border.title"))); // NOI18N
            jPanel13.setName("jPanel13"); // NOI18N

            jScrollPane7.setName("jScrollPane7"); // NOI18N

            jt_eninvefamilia.setModel(this.jtable_modelo_familiaeninve);
            jt_eninvefamilia.setName("jt_eninvefamilia"); // NOI18N
            jt_eninvefamilia.setRowHeight(22);
            jt_eninvefamilia.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_eninvefamiliaMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        diodblclickverfameninve(evt);
                        //System.out.println(" double click" );
                    }
                }
            });
            jScrollPane7.setViewportView(jt_eninvefamilia);

            jcbx_idstatus.setName("jcbx_idstatus"); // NOI18N

            jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
            jLabel4.setName("jLabel4"); // NOI18N

            jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
            jLabel13.setName("jLabel13"); // NOI18N

            jtf_invepadredescripcion.setText(resourceMap.getString("jtf_invepadredescripcion.text")); // NOI18N
            jtf_invepadredescripcion.setName("jtf_invepadredescripcion"); // NOI18N

            jbtn_invepadreactualizar.setIcon(resourceMap.getIcon("jbtn_invepadreactualizar.icon")); // NOI18N
            jbtn_invepadreactualizar.setText(resourceMap.getString("jbtn_invepadreactualizar.text")); // NOI18N
            jbtn_invepadreactualizar.setName("jbtn_invepadreactualizar"); // NOI18N
            jbtn_invepadreactualizar.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_invepadreactualizarActionPerformed(evt);
                }
            });

            jLabel21.setText(resourceMap.getString("jLabel21.text")); // NOI18N
            jLabel21.setName("jLabel21"); // NOI18N

            jtf_invepadrefecha.setEditable(false);
            jtf_invepadrefecha.setName("jtf_invepadrefecha"); // NOI18N

            jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
            jLabel25.setName("jLabel25"); // NOI18N

            jtf_idstatus.setEditable(false);
            jtf_idstatus.setName("jtf_idstatus"); // NOI18N

            javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
            jPanel13.setLayout(jPanel13Layout);
            jPanel13Layout.setHorizontalGroup(
                jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()
                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel13Layout.createSequentialGroup()
                            .addComponent(jLabel4)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jcbx_idstatus, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel13Layout.createSequentialGroup()
                            .addComponent(jLabel13)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_invepadredescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel13Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jbtn_invepadreactualizar))
                        .addGroup(jPanel13Layout.createSequentialGroup()
                            .addComponent(jLabel21)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jtf_invepadrefecha, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel13Layout.createSequentialGroup()
                            .addComponent(jLabel25)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jtf_idstatus, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 323, javax.swing.GroupLayout.PREFERRED_SIZE))
            );
            jPanel13Layout.setVerticalGroup(
                jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE)
                .addGroup(jPanel13Layout.createSequentialGroup()
                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel4)
                        .addComponent(jcbx_idstatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel13)
                        .addComponent(jtf_invepadredescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel21)
                        .addComponent(jtf_invepadrefecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel25)
                        .addComponent(jtf_idstatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addComponent(jbtn_invepadreactualizar))
            );

            jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
            jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
            jButton1.setToolTipText(resourceMap.getString("jButton1.toolTipText")); // NOI18N
            jButton1.setName("jButton1"); // NOI18N
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
                }
            });

            jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel14.border.title"))); // NOI18N
            jPanel14.setName("jPanel14"); // NOI18N

            jScrollPane8.setName("jScrollPane8"); // NOI18N

            jt_eninvesfamilia.setModel(this.jtable_modelo_subfameninve);
            jt_eninvesfamilia.setName("jt_eninvesfamilia"); // NOI18N
            jt_eninvesfamilia.setRowHeight(22);
            jt_eninvesfamilia.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_eninvesfamiliaMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        diodblclickvsaeninve(evt);
                        //System.out.println(" double click" );

                    }
                }
            });
            jScrollPane8.setViewportView(jt_eninvesfamilia);

            javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
            jPanel14.setLayout(jPanel14Layout);
            jPanel14Layout.setHorizontalGroup(
                jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 383, Short.MAX_VALUE)
            );
            jPanel14Layout.setVerticalGroup(
                jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE)
            );

            jPanel15.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel15.border.title"))); // NOI18N
            jPanel15.setName("jPanel15"); // NOI18N

            jScrollPane9.setName("jScrollPane9"); // NOI18N

            jt_articuloseninve.setModel(this.jtable_modelo_Articeninve);
            jt_articuloseninve.setName("jt_articuloseninve"); // NOI18N
            jt_repfamilia.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_repfamiliaMouseClicked(evt);
                    if(evt.getClickCount() >= 2)
                    {
                        diodblclickfam(evt);
                        //System.out.println(" double click" );

                    }
                }
            });
            jScrollPane9.setViewportView(jt_articuloseninve);

            javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
            jPanel15.setLayout(jPanel15Layout);
            jPanel15Layout.setHorizontalGroup(
                jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 949, Short.MAX_VALUE)
            );
            jPanel15Layout.setVerticalGroup(
                jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 358, javax.swing.GroupLayout.PREFERRED_SIZE)
            );

            jtf_inveactualstatus.setEditable(false);
            jtf_inveactualstatus.setText(resourceMap.getString("jtf_inveactualstatus.text")); // NOI18N
            jtf_inveactualstatus.setName("jtf_inveactualstatus"); // NOI18N

            jtf_inveactualfecha.setEditable(false);
            jtf_inveactualfecha.setName("jtf_inveactualfecha"); // NOI18N

            jLabel32.setFont(resourceMap.getFont("jLabel32.font")); // NOI18N
            jLabel32.setText(resourceMap.getString("jLabel32.text")); // NOI18N
            jLabel32.setName("jLabel32"); // NOI18N

            jtf_articuloscantidad.setEditable(false);
            jtf_articuloscantidad.setFont(resourceMap.getFont("jtf_articuloscantidad.font")); // NOI18N
            jtf_articuloscantidad.setText(resourceMap.getString("jtf_articuloscantidad.text")); // NOI18N
            jtf_articuloscantidad.setName("jtf_articuloscantidad"); // NOI18N

            jbtn_imprimirteorico.setIcon(resourceMap.getIcon("jbtn_imprimirteorico.icon")); // NOI18N
            jbtn_imprimirteorico.setText(resourceMap.getString("jbtn_imprimirteorico.text")); // NOI18N
            jbtn_imprimirteorico.setName("jbtn_imprimirteorico"); // NOI18N
            jbtn_imprimirteorico.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_imprimirteoricoActionPerformed(evt);
                }
            });

            jLabel33.setFont(resourceMap.getFont("jLabel33.font")); // NOI18N
            jLabel33.setText(resourceMap.getString("jLabel33.text")); // NOI18N
            jLabel33.setName("jLabel33"); // NOI18N

            jtf_articuloscantidad1.setEditable(false);
            jtf_articuloscantidad1.setFont(resourceMap.getFont("jtf_articuloscantidad1.font")); // NOI18N
            jtf_articuloscantidad1.setText(resourceMap.getString("jtf_articuloscantidad1.text")); // NOI18N
            jtf_articuloscantidad1.setName("jtf_articuloscantidad1"); // NOI18N

            jtf_pagini.setText(resourceMap.getString("jtf_pagini.text")); // NOI18N
            jtf_pagini.setName("jtf_pagini"); // NOI18N
            jtf_pagini.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_paginiActionPerformed(evt);
                }
            });

            jtf_pagfin.setText(resourceMap.getString("jtf_pagfin.text")); // NOI18N
            jtf_pagfin.setName("jtf_pagfin"); // NOI18N
            jtf_pagfin.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_pagfinActionPerformed(evt);
                }
            });

            jtf_articuloscantidadf.setEditable(false);
            jtf_articuloscantidadf.setFont(resourceMap.getFont("jtf_articuloscantidadf.font")); // NOI18N
            jtf_articuloscantidadf.setText(resourceMap.getString("jtf_articuloscantidadf.text")); // NOI18N
            jtf_articuloscantidadf.setName("jtf_articuloscantidadf"); // NOI18N

            jLabel34.setFont(resourceMap.getFont("jLabel34.font")); // NOI18N
            jLabel34.setText(resourceMap.getString("jLabel34.text")); // NOI18N
            jLabel34.setName("jLabel34"); // NOI18N

            jButton4.setIcon(resourceMap.getIcon("jButton4.icon")); // NOI18N
            jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
            jButton4.setName("jButton4"); // NOI18N
            jButton4.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton4ActionPerformed(evt);
                }
            });

            jtf_ifprecio.setEditable(false);
            jtf_ifprecio.setFont(resourceMap.getFont("jtf_ifprecio.font")); // NOI18N
            jtf_ifprecio.setText(resourceMap.getString("jtf_ifprecio.text")); // NOI18N
            jtf_ifprecio.setName("jtf_ifprecio"); // NOI18N

            jtf_ifcosto.setEditable(false);
            jtf_ifcosto.setFont(resourceMap.getFont("jtf_ifcosto.font")); // NOI18N
            jtf_ifcosto.setText(resourceMap.getString("jtf_ifcosto.text")); // NOI18N
            jtf_ifcosto.setName("jtf_ifcosto"); // NOI18N

            javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jButton1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_inveactualstatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_inveactualfecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel32)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_articuloscantidad, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel33)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_articuloscantidad1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel34)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_articuloscantidadf, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(37, 37, 37)
                            .addComponent(jtf_ifcosto, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_ifprecio, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jButton4)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_pagini, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(jtf_pagfin, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(jbtn_imprimirteorico))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addContainerGap())
                .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            );
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jButton1)
                        .addComponent(jbtn_imprimirteorico)
                        .addComponent(jtf_inveactualstatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_pagini, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_pagfin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_inveactualfecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel32)
                        .addComponent(jtf_articuloscantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel33)
                        .addComponent(jtf_articuloscantidad1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jButton4)
                        .addComponent(jLabel34)
                        .addComponent(jtf_articuloscantidadf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_ifprecio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_ifcosto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap())
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

            jPanel8.setName("jPanel8"); // NOI18N

            jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel10.border.title"))); // NOI18N
            jPanel10.setName("jPanel10"); // NOI18N

            jScrollPane4.setName("jScrollPane4"); // NOI18N

            jt_repsubfam.setModel(this.jtable_modelo_subfam);
            jt_repsubfam.setName("jt_repsubfam"); // NOI18N
            jt_repsubfam.setRowHeight(26);
            jt_repsubfam.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_repsubfamMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        diodblclick(evt);
                        //System.out.println(" double click" );

                    }
                }
            });
            jScrollPane4.setViewportView(jt_repsubfam);

            javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
            jPanel10.setLayout(jPanel10Layout);
            jPanel10Layout.setHorizontalGroup(
                jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 421, Short.MAX_VALUE)
            );
            jPanel10Layout.setVerticalGroup(
                jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
            );

            jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel11.border.title"))); // NOI18N
            jPanel11.setName("jPanel11"); // NOI18N

            jScrollPane5.setName("jScrollPane5"); // NOI18N

            jtb_catalogo_articulos.setModel(this.jtable_modelo_diferencias);
            jtb_catalogo_articulos.setName("jtb_catalogo_articulos"); // NOI18N
            jtb_catalogo_articulos.setRowHeight(26);
            jtb_catalogo_articulos.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jtb_catalogo_articulosMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclickidartideta(evt);
                        //System.out.println(" double click" );

                    }
                    if(evt.getClickCount() >= 2)
                    {
                        dioclickidarti(evt);
                        //System.out.println(" double click" );

                    }
                }
            });
            jScrollPane5.setViewportView(jtb_catalogo_articulos);

            jScrollPane10.setName("jScrollPane10"); // NOI18N

            jtb_catalogo_historialfisico.setModel(this.jtable_modelo_Artihistorifisico);
            jtb_catalogo_historialfisico.setName("jtb_catalogo_historialfisico"); // NOI18N
            jtb_catalogo_historialfisico.setRowHeight(26);
            jScrollPane10.setViewportView(jtb_catalogo_historialfisico);

            buttonGroup1.add(jrbtn_ambos);
            jrbtn_ambos.setText(resourceMap.getString("jrbtn_ambos.text")); // NOI18N
            jrbtn_ambos.setActionCommand(resourceMap.getString("jrbtn_ambos.actionCommand")); // NOI18N
            jrbtn_ambos.setName("jrbtn_ambos"); // NOI18N
            jrbtn_ambos.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_ambosActionPerformed(evt);
                }
            });

            buttonGroup1.add(jrbtn_faltante);
            jrbtn_faltante.setText(resourceMap.getString("jrbtn_faltante.text")); // NOI18N
            jrbtn_faltante.setActionCommand(resourceMap.getString("jrbtn_faltante.actionCommand")); // NOI18N
            jrbtn_faltante.setName("jrbtn_faltante"); // NOI18N
            jrbtn_faltante.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_faltanteActionPerformed(evt);
                }
            });

            buttonGroup1.add(jrbtn_sobrante);
            jrbtn_sobrante.setText(resourceMap.getString("jrbtn_sobrante.text")); // NOI18N
            jrbtn_sobrante.setActionCommand(resourceMap.getString("jrbtn_sobrante.actionCommand")); // NOI18N
            jrbtn_sobrante.setName("jrbtn_sobrante"); // NOI18N
            jrbtn_sobrante.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_sobranteActionPerformed(evt);
                }
            });

            jtf_subfamactual.setEditable(false);
            jtf_subfamactual.setFont(resourceMap.getFont("jtf_subfamactual.font")); // NOI18N
            jtf_subfamactual.setText(resourceMap.getString("jtf_subfamactual.text")); // NOI18N
            jtf_subfamactual.setName("jtf_subfamactual"); // NOI18N

            jScrollPane11.setName("jScrollPane11"); // NOI18N

            jep_articuloimagen.setContentType(resourceMap.getString("jep_articuloimagen.contentType")); // NOI18N
            jep_articuloimagen.setName("jep_articuloimagen"); // NOI18N
            jScrollPane11.setViewportView(jep_articuloimagen);

            jbtn_agregar.setText(resourceMap.getString("jbtn_agregar.text")); // NOI18N
            jbtn_agregar.setName("jbtn_agregar"); // NOI18N
            jbtn_agregar.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_agregarActionPerformed(evt);
                }
            });

            jtf_inveclave2.setName("jtf_inveclave2"); // NOI18N
            jtf_inveclave2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_inveclave2ActionPerformed(evt);
                }
            });

            javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
            jPanel11.setLayout(jPanel11Layout);
            jPanel11Layout.setHorizontalGroup(
                jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel11Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jtf_subfamactual, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jrbtn_ambos)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jrbtn_faltante)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jrbtn_sobrante)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jbtn_agregar)
                    .addGap(29, 29, 29)
                    .addComponent(jtf_inveclave2, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(143, Short.MAX_VALUE))
                .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 949, Short.MAX_VALUE)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 732, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE))
            );
            jPanel11Layout.setVerticalGroup(
                jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel11Layout.createSequentialGroup()
                    .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jrbtn_ambos)
                        .addComponent(jrbtn_faltante)
                        .addComponent(jrbtn_sobrante)
                        .addComponent(jtf_subfamactual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jbtn_agregar)
                        .addComponent(jtf_inveclave2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(6, 6, 6)
                    .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE))
            );

            jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel12.border.title"))); // NOI18N
            jPanel12.setName("jPanel12"); // NOI18N

            jScrollPane6.setName("jScrollPane6"); // NOI18N

            jt_repfamilia.setModel(this.jtable_modelo_familia);
            jt_repfamilia.setName("jt_repfamilia"); // NOI18N
            jt_repfamilia.setRowHeight(26);
            jt_repfamilia.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_repfamiliaMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        diodblclickfam(evt);
                        //System.out.println(" double click" );

                    }
                }
            });
            jScrollPane6.setViewportView(jt_repfamilia);

            javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
            jPanel12.setLayout(jPanel12Layout);
            jPanel12Layout.setHorizontalGroup(
                jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 496, Short.MAX_VALUE)
            );
            jPanel12Layout.setVerticalGroup(
                jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
            );

            jbtn_reporte.setText(resourceMap.getString("jbtn_reporte.text")); // NOI18N
            jbtn_reporte.setName("jbtn_reporte"); // NOI18N
            jbtn_reporte.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_reporteActionPerformed(evt);
                }
            });

            jbtn_congelarexistencias.setText(resourceMap.getString("jbtn_congelarexistencias.text")); // NOI18N
            jbtn_congelarexistencias.setToolTipText(resourceMap.getString("jbtn_congelarexistencias.toolTipText")); // NOI18N
            jbtn_congelarexistencias.setName("jbtn_congelarexistencias"); // NOI18N
            jbtn_congelarexistencias.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_congelarexistenciasActionPerformed(evt);
                }
            });

            jCheckBox1.setText(resourceMap.getString("jCheckBox1.text")); // NOI18N
            jCheckBox1.setName("jCheckBox1"); // NOI18N
            jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jCheckBox1ActionPerformed(evt);
                }
            });

            jlbl_historial.setFont(resourceMap.getFont("jlbl_historial.font")); // NOI18N
            jlbl_historial.setText(resourceMap.getString("jlbl_historial.text")); // NOI18N
            jlbl_historial.setName("jlbl_historial"); // NOI18N

            javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
            jPanel8.setLayout(jPanel8Layout);
            jPanel8Layout.setHorizontalGroup(
                jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel8Layout.createSequentialGroup()
                            .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel8Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jbtn_reporte, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jbtn_congelarexistencias)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jCheckBox1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jlbl_historial, javax.swing.GroupLayout.PREFERRED_SIZE, 367, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap())
                .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            );
            jPanel8Layout.setVerticalGroup(
                jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel8Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jbtn_reporte)
                        .addComponent(jbtn_congelarexistencias)
                        .addComponent(jCheckBox1)
                        .addComponent(jlbl_historial))
                    .addContainerGap())
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel8.TabConstraints.tabTitle"), jPanel8); // NOI18N

            jPanel9.setName("jPanel9"); // NOI18N

            jPanel19.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel19.border.title"))); // NOI18N
            jPanel19.setName("jPanel19"); // NOI18N

            jScrollPane14.setName("jScrollPane14"); // NOI18N

            jt_repsubfam1.setModel(this.jtable_modelo_subfam2);
            jt_repsubfam1.setName("jt_repsubfam1"); // NOI18N
            jt_repsubfam1.setRowHeight(26);
            jt_repsubfam1.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_repsubfam1MouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        diodblclick2(evt);
                        //System.out.println(" double click" );

                    }
                }
            });
            jScrollPane14.setViewportView(jt_repsubfam1);

            javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
            jPanel19.setLayout(jPanel19Layout);
            jPanel19Layout.setHorizontalGroup(
                jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 435, Short.MAX_VALUE)
            );
            jPanel19Layout.setVerticalGroup(
                jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 168, Short.MAX_VALUE)
            );

            jPanel20.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel20.border.title"))); // NOI18N
            jPanel20.setName("jPanel20"); // NOI18N

            jScrollPane15.setName("jScrollPane15"); // NOI18N

            jt_repsubfamhistorial.setModel(this.jtable_modelo_subfamhis);
            jt_repsubfamhistorial.setName("jt_repsubfamhistorial"); // NOI18N
            jt_repsubfamhistorial.setRowHeight(26);
            jt_repsubfamhistorial.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_repsubfamhistorialMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        diodblclick3(evt);
                        //System.out.println(" double click" );

                    }
                }
            });
            jScrollPane15.setViewportView(jt_repsubfamhistorial);

            javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
            jPanel20.setLayout(jPanel20Layout);
            jPanel20Layout.setHorizontalGroup(
                jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane15, javax.swing.GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE)
            );
            jPanel20Layout.setVerticalGroup(
                jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane15, javax.swing.GroupLayout.DEFAULT_SIZE, 168, Short.MAX_VALUE)
            );

            jPanel21.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel21.border.title"))); // NOI18N
            jPanel21.setName("jPanel21"); // NOI18N

            jScrollPane16.setName("jScrollPane16"); // NOI18N

            jtb_catalogo_articulos1.setModel(this.jtable_modelo2);
            jtb_catalogo_articulos1.setName("jtb_catalogo_articulos1"); // NOI18N
            jtb_catalogo_articulos1.setRowHeight(26);
            jtb_catalogo_articulos1.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jtb_catalogo_articulos1MouseClicked(evt);
                    if(evt.getClickCount() >= 2)
                    {
                        dioclickva(evt);
                        //System.out.println(" double click" );

                    }
                    if(evt.getClickCount() >= 1)
                    {
                        dioclickva2(evt);
                        //System.out.println(" double click" );

                    }
                }
            });
            jScrollPane16.setViewportView(jtb_catalogo_articulos1);

            jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
            jLabel22.setName("jLabel22"); // NOI18N

            jtf_describsubhis.setEditable(false);
            jtf_describsubhis.setFont(resourceMap.getFont("jtf_describsubhis.font")); // NOI18N
            jtf_describsubhis.setText(resourceMap.getString("jtf_describsubhis.text")); // NOI18N
            jtf_describsubhis.setName("jtf_describsubhis"); // NOI18N

            jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
            jLabel23.setName("jLabel23"); // NOI18N

            jtf_invepadrefecha1.setEditable(false);
            jtf_invepadrefecha1.setName("jtf_invepadrefecha1"); // NOI18N

            jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
            jButton2.setName("jButton2"); // NOI18N
            jButton2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton2ActionPerformed(evt);
                }
            });

            jtf_inveclave1.setName("jtf_inveclave1"); // NOI18N
            jtf_inveclave1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_inveclave1ActionPerformed(evt);
                }
            });

            jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
            jLabel24.setName("jLabel24"); // NOI18N

            javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);
            jPanel21.setLayout(jPanel21Layout);
            jPanel21Layout.setHorizontalGroup(
                jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel21Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel22)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_describsubhis, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel23)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jtf_invepadrefecha1, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jButton2))
                .addComponent(jScrollPane16, javax.swing.GroupLayout.DEFAULT_SIZE, 508, Short.MAX_VALUE)
                .addGroup(jPanel21Layout.createSequentialGroup()
                    .addComponent(jtf_inveclave1, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(58, 58, 58)
                    .addComponent(jLabel24, javax.swing.GroupLayout.DEFAULT_SIZE, 252, Short.MAX_VALUE)
                    .addContainerGap())
            );
            jPanel21Layout.setVerticalGroup(
                jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel21Layout.createSequentialGroup()
                    .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel22)
                        .addComponent(jtf_describsubhis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel23)
                        .addComponent(jtf_invepadrefecha1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jButton2))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane16, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE)
                    .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_inveclave1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel24)))
            );

            jPanel22.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel22.border.title"))); // NOI18N
            jPanel22.setName("jPanel22"); // NOI18N

            jScrollPane17.setName("jScrollPane17"); // NOI18N

            jtbl_kardex1.setModel(this.jtable_modelo_kardex);
            jtbl_kardex1.setName("jtbl_kardex1"); // NOI18N
            jtbl_kardex1.setRowHeight(26);
            jScrollPane17.setViewportView(jtbl_kardex1);

            jtf_invearticulo.setEditable(false);
            jtf_invearticulo.setFont(resourceMap.getFont("jtf_invearticulo.font")); // NOI18N
            jtf_invearticulo.setName("jtf_invearticulo"); // NOI18N

            jtf_inveclave.setEditable(false);
            jtf_inveclave.setName("jtf_inveclave"); // NOI18N

            javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
            jPanel22.setLayout(jPanel22Layout);
            jPanel22Layout.setHorizontalGroup(
                jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane17, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel22Layout.createSequentialGroup()
                    .addComponent(jtf_inveclave, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_invearticulo, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE))
            );
            jPanel22Layout.setVerticalGroup(
                jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel22Layout.createSequentialGroup()
                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_invearticulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_inveclave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane17, javax.swing.GroupLayout.DEFAULT_SIZE, 385, Short.MAX_VALUE))
            );

            javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
            jPanel9.setLayout(jPanel9Layout);
            jPanel9Layout.setHorizontalGroup(
                jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel9Layout.createSequentialGroup()
                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
                            .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel9Layout.createSequentialGroup()
                            .addComponent(jPanel21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jPanel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addContainerGap())
            );
            jPanel9Layout.setVerticalGroup(
                jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jPanel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(jPanel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel9.TabConstraints.tabTitle"), jPanel9); // NOI18N

            jPanel16.setName("jPanel16"); // NOI18N

            jPanel17.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel17.border.title"))); // NOI18N
            jPanel17.setName("jPanel17"); // NOI18N

            jScrollPane12.setName("jScrollPane12"); // NOI18N

            jt_sobrantes.setModel(this.jtable_modelo_sobrante);
            jt_sobrantes.setName("jt_sobrantes"); // NOI18N
            jt_sobrantes.setRowHeight(26);
            // TODO add your handling code here:
            jt_sobrantes.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_sobrantesMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclicksobrante(evt);
                        //System.out.println(" double click" );
                    }
                }
            });
            jScrollPane12.setViewportView(jt_sobrantes);

            jLabel26.setText(resourceMap.getString("jLabel26.text")); // NOI18N
            jLabel26.setName("jLabel26"); // NOI18N

            jtf_importesob.setEditable(false);
            jtf_importesob.setText(resourceMap.getString("jtf_importesob.text")); // NOI18N
            jtf_importesob.setName("jtf_importesob"); // NOI18N

            jLabel30.setText(resourceMap.getString("jLabel30.text")); // NOI18N
            jLabel30.setName("jLabel30"); // NOI18N

            jtf_operosobfol.setEditable(false);
            jtf_operosobfol.setText(resourceMap.getString("jtf_operosobfol.text")); // NOI18N
            jtf_operosobfol.setName("jtf_operosobfol"); // NOI18N
            jtf_operosobfol.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_operosobfolActionPerformed(evt);
                }
            });

            jcb_verfotos1.setText(resourceMap.getString("jcb_verfotos1.text")); // NOI18N
            jcb_verfotos1.setToolTipText(resourceMap.getString("jcb_verfotos1.toolTipText")); // NOI18N
            jcb_verfotos1.setName("jcb_verfotos1"); // NOI18N
            jcb_verfotos1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jcb_verfotos1ActionPerformed(evt);
                }
            });

            jtf_deletefila.setEditable(false);
            jtf_deletefila.setName("jtf_deletefila"); // NOI18N

            jLabel29.setText(resourceMap.getString("jLabel29.text")); // NOI18N
            jLabel29.setName("jLabel29"); // NOI18N

            jtf_importefal2.setEditable(false);
            jtf_importefal2.setText(resourceMap.getString("jtf_importefal2.text")); // NOI18N
            jtf_importefal2.setName("jtf_importefal2"); // NOI18N

            jLabel38.setText(resourceMap.getString("jLabel38.text")); // NOI18N
            jLabel38.setName("jLabel38"); // NOI18N

            jtf_importefal3.setEditable(false);
            jtf_importefal3.setText(resourceMap.getString("jtf_importefal3.text")); // NOI18N
            jtf_importefal3.setName("jtf_importefal3"); // NOI18N

            javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
            jPanel17.setLayout(jPanel17Layout);
            jPanel17Layout.setHorizontalGroup(
                jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel17Layout.createSequentialGroup()
                    .addGap(7, 7, 7)
                    .addComponent(jLabel29)
                    .addGap(18, 18, 18)
                    .addComponent(jtf_importefal2, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(jLabel38)
                    .addGap(18, 18, 18)
                    .addComponent(jtf_importefal3, javax.swing.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jLabel26)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_importesob, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel30)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_operosobfol, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(jcb_verfotos1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jtf_deletefila, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(134, 134, 134))
                .addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 885, Short.MAX_VALUE)
            );
            jPanel17Layout.setVerticalGroup(
                jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel17Layout.createSequentialGroup()
                    .addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 196, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_importefal2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel29)
                        .addComponent(jtf_deletefila, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel26)
                        .addComponent(jtf_importesob, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel30)
                        .addComponent(jtf_operosobfol, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jcb_verfotos1)
                        .addComponent(jtf_importefal3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel38)))
            );

            jPanel18.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel18.border.title"))); // NOI18N
            jPanel18.setName("jPanel18"); // NOI18N

            jScrollPane13.setName("jScrollPane13"); // NOI18N

            jt_faltantes.setModel(this.jtable_modelo_faltante);
            jt_faltantes.setName("jt_faltantes"); // NOI18N
            jt_faltantes.setRowHeight(26);
            // TODO add your handling code here:
            jt_faltantes.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jt_faltantesMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclickfaltante(evt);
                        //System.out.println(" double click" );
                    }
                }
            });
            jScrollPane13.setViewportView(jt_faltantes);

            jLabel27.setText(resourceMap.getString("jLabel27.text")); // NOI18N
            jLabel27.setName("jLabel27"); // NOI18N

            jtf_importefal.setEditable(false);
            jtf_importefal.setText(resourceMap.getString("jtf_importefal.text")); // NOI18N
            jtf_importefal.setName("jtf_importefal"); // NOI18N

            jLabel31.setText(resourceMap.getString("jLabel31.text")); // NOI18N
            jLabel31.setName("jLabel31"); // NOI18N

            jtf_operofalfol.setEditable(false);
            jtf_operofalfol.setText(resourceMap.getString("jtf_operofalfol.text")); // NOI18N
            jtf_operofalfol.setName("jtf_operofalfol"); // NOI18N
            jtf_operofalfol.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_operofalfolActionPerformed(evt);
                }
            });

            jcb_verfotos2.setText(resourceMap.getString("jcb_verfotos2.text")); // NOI18N
            jcb_verfotos2.setToolTipText(resourceMap.getString("jcb_verfotos2.toolTipText")); // NOI18N
            jcb_verfotos2.setName("jcb_verfotos2"); // NOI18N
            jcb_verfotos2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jcb_verfotos2ActionPerformed(evt);
                }
            });

            jtf_deletefila1.setEditable(false);
            jtf_deletefila1.setName("jtf_deletefila1"); // NOI18N

            jLabel28.setText(resourceMap.getString("jLabel28.text")); // NOI18N
            jLabel28.setName("jLabel28"); // NOI18N

            jtf_importefal1.setEditable(false);
            jtf_importefal1.setText(resourceMap.getString("jtf_importefal1.text")); // NOI18N
            jtf_importefal1.setName("jtf_importefal1"); // NOI18N

            jLabel39.setText(resourceMap.getString("jLabel39.text")); // NOI18N
            jLabel39.setName("jLabel39"); // NOI18N

            jtf_importefal4.setEditable(false);
            jtf_importefal4.setText(resourceMap.getString("jtf_importefal4.text")); // NOI18N
            jtf_importefal4.setName("jtf_importefal4"); // NOI18N

            javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
            jPanel18.setLayout(jPanel18Layout);
            jPanel18Layout.setHorizontalGroup(
                jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel18Layout.createSequentialGroup()
                    .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 885, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(jPanel18Layout.createSequentialGroup()
                            .addComponent(jLabel28)
                            .addGap(18, 18, 18)
                            .addComponent(jtf_importefal1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jLabel39)
                            .addGap(18, 18, 18)
                            .addComponent(jtf_importefal4, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(jLabel27)
                            .addGap(18, 18, 18)
                            .addComponent(jtf_importefal, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel31)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_operofalfol, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jcb_verfotos2)
                            .addGap(18, 18, 18)
                            .addComponent(jtf_deletefila1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(54, 54, 54))
            );
            jPanel18Layout.setVerticalGroup(
                jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createSequentialGroup()
                    .addComponent(jScrollPane13, javax.swing.GroupLayout.DEFAULT_SIZE, 247, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_importefal1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel28)
                        .addComponent(jtf_deletefila1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_importefal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel31)
                        .addComponent(jtf_operofalfol, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel27)
                        .addComponent(jcb_verfotos2)
                        .addComponent(jtf_importefal4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel39)))
            );

            jbtn_genramovextsal.setText(resourceMap.getString("jbtn_genramovextsal.text")); // NOI18N
            jbtn_genramovextsal.setName("jbtn_genramovextsal"); // NOI18N
            jbtn_genramovextsal.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_genramovextsalActionPerformed(evt);
                }
            });

            jbtn_genramovextsal1.setText(resourceMap.getString("jbtn_genramovextsal1.text")); // NOI18N
            jbtn_genramovextsal1.setName("jbtn_genramovextsal1"); // NOI18N
            jbtn_genramovextsal1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_genramovextsal1ActionPerformed(evt);
                }
            });

            javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
            jPanel16.setLayout(jPanel16Layout);
            jPanel16Layout.setHorizontalGroup(
                jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel16Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, 955, Short.MAX_VALUE)
                        .addGroup(jPanel16Layout.createSequentialGroup()
                            .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap())
                        .addGroup(jPanel16Layout.createSequentialGroup()
                            .addComponent(jbtn_genramovextsal, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(29, 29, 29)
                            .addComponent(jbtn_genramovextsal1, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(492, Short.MAX_VALUE))))
            );
            jPanel16Layout.setVerticalGroup(
                jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel16Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jbtn_genramovextsal)
                        .addComponent(jbtn_genramovextsal1))
                    .addContainerGap(29, Short.MAX_VALUE))
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel16.TabConstraints.tabTitle"), jPanel16); // NOI18N

            jPanel23.setName("jPanel23"); // NOI18N

            jPanel24.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel24.border.title"))); // NOI18N
            jPanel24.setName("jPanel24"); // NOI18N

            jLabel35.setText(resourceMap.getString("jLabel35.text")); // NOI18N
            jLabel35.setName("jLabel35"); // NOI18N

            jdc_fechainicial.setToolTipText(resourceMap.getString("jdc_fechainicial.toolTipText")); // NOI18N
            jdc_fechainicial.setDateFormatString(resourceMap.getString("jdc_fechainicial.dateFormatString")); // NOI18N
            jdc_fechainicial.setName("jdc_fechainicial"); // NOI18N
            jdc_fechainicial.addKeyListener(new java.awt.event.KeyAdapter() {
                public void keyPressed(java.awt.event.KeyEvent evt) {
                    jdc_fechainicialKeyPressed(evt);
                }
            });

            jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
            jLabel36.setName("jLabel36"); // NOI18N

            jdc_fechafinal.setToolTipText(resourceMap.getString("jdc_fechafinal.toolTipText")); // NOI18N
            jdc_fechafinal.setDateFormatString(resourceMap.getString("jdc_fechafinal.dateFormatString")); // NOI18N
            jdc_fechafinal.setMaxSelectableDate(new java.util.Date(253370790102000L));
            jdc_fechafinal.setName("jdc_fechafinal"); // NOI18N

            jbtn_generarreporte.setIcon(resourceMap.getIcon("jbtn_generarreporte.icon")); // NOI18N
            jbtn_generarreporte.setText(resourceMap.getString("jbtn_generarreporte.text")); // NOI18N
            jbtn_generarreporte.setToolTipText(resourceMap.getString("jbtn_generarreporte.toolTipText")); // NOI18N
            jbtn_generarreporte.setName("jbtn_generarreporte"); // NOI18N
            jbtn_generarreporte.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_generarreporteActionPerformed(evt);
                }
            });

            jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
            jLabel37.setName("jLabel37"); // NOI18N

            jScrollPane18.setName("jScrollPane18"); // NOI18N

            jt_repsubfam2.setModel(this.jtable_modelo_estadistica);
            jt_repsubfam2.setName("jt_repsubfam2"); // NOI18N
            jt_repsubfam2.setRowHeight(26);
            jScrollPane18.setViewportView(jt_repsubfam2);

            jbtn_generarreporte1.setIcon(resourceMap.getIcon("jbtn_generarreporte1.icon")); // NOI18N
            jbtn_generarreporte1.setText(resourceMap.getString("jbtn_generarreporte1.text")); // NOI18N
            jbtn_generarreporte1.setToolTipText(resourceMap.getString("jbtn_generarreporte1.toolTipText")); // NOI18N
            jbtn_generarreporte1.setName("jbtn_generarreporte1"); // NOI18N
            jbtn_generarreporte1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_generarreporte1ActionPerformed(evt);
                }
            });

            jbtn_generarreporte2.setIcon(resourceMap.getIcon("jbtn_generarreporte2.icon")); // NOI18N
            jbtn_generarreporte2.setText(resourceMap.getString("jbtn_generarreporte2.text")); // NOI18N
            jbtn_generarreporte2.setToolTipText(resourceMap.getString("jbtn_generarreporte2.toolTipText")); // NOI18N
            jbtn_generarreporte2.setName("jbtn_generarreporte2"); // NOI18N
            jbtn_generarreporte2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_generarreporte2ActionPerformed(evt);
                }
            });

            jbtn_generarreporte3.setText(resourceMap.getString("jbtn_generarreporte3.text")); // NOI18N
            jbtn_generarreporte3.setToolTipText(resourceMap.getString("jbtn_generarreporte3.toolTipText")); // NOI18N
            jbtn_generarreporte3.setName("jbtn_generarreporte3"); // NOI18N
            jbtn_generarreporte3.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_generarreporte3ActionPerformed(evt);
                }
            });

            javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24);
            jPanel24.setLayout(jPanel24Layout);
            jPanel24Layout.setHorizontalGroup(
                jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel24Layout.createSequentialGroup()
                    .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel24Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jLabel37))
                        .addGroup(jPanel24Layout.createSequentialGroup()
                            .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel24Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jdc_fechainicial, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addComponent(jbtn_generarreporte, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addGroup(jPanel24Layout.createSequentialGroup()
                                    .addComponent(jLabel36)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jdc_fechafinal, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addComponent(jbtn_generarreporte1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jbtn_generarreporte3, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                                .addComponent(jbtn_generarreporte2, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)))
                        .addComponent(jScrollPane18, javax.swing.GroupLayout.DEFAULT_SIZE, 493, Short.MAX_VALUE))
                    .addContainerGap())
            );
            jPanel24Layout.setVerticalGroup(
                jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel24Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jdc_fechafinal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jdc_fechainicial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel36)
                        .addComponent(jbtn_generarreporte2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 7, Short.MAX_VALUE)
                    .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jbtn_generarreporte, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jbtn_generarreporte1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jbtn_generarreporte3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane18, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel37))
            );

            jPanel25.setName("jPanel25"); // NOI18N

            jScrollPane3.setName("jScrollPane3"); // NOI18N

            jta_archivo.setColumns(20);
            jta_archivo.setRows(5);
            jta_archivo.setName("jta_archivo"); // NOI18N
            jScrollPane3.setViewportView(jta_archivo);

            jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
            jLabel3.setName("jLabel3"); // NOI18N

            jbtn_importar.setIcon(resourceMap.getIcon("jbtn_importar.icon")); // NOI18N
            jbtn_importar.setText(resourceMap.getString("jbtn_importar.text")); // NOI18N
            jbtn_importar.setToolTipText(resourceMap.getString("jbtn_importar.toolTipText")); // NOI18N
            jbtn_importar.setName("jbtn_importar"); // NOI18N
            jbtn_importar.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_importarActionPerformed(evt);
                }
            });

            javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25);
            jPanel25.setLayout(jPanel25Layout);
            jPanel25Layout.setHorizontalGroup(
                jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 414, Short.MAX_VALUE)
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel25Layout.createSequentialGroup()
                        .addGap(48, 48, 48)
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jbtn_importar, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap(49, Short.MAX_VALUE)))
            );
            jPanel25Layout.setVerticalGroup(
                jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 291, Short.MAX_VALUE)
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel25Layout.createSequentialGroup()
                        .addGap(118, 118, 118)
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel25Layout.createSequentialGroup()
                                .addComponent(jLabel3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jbtn_importar)))
                        .addContainerGap(119, Short.MAX_VALUE)))
            );

            javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);
            jPanel23.setLayout(jPanel23Layout);
            jPanel23Layout.setHorizontalGroup(
                jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel23Layout.createSequentialGroup()
                    .addComponent(jPanel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jPanel25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(22, Short.MAX_VALUE))
            );
            jPanel23Layout.setVerticalGroup(
                jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel23Layout.createSequentialGroup()
                    .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(jPanel23Layout.createSequentialGroup()
                            .addGap(11, 11, 11)
                            .addComponent(jPanel25, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addComponent(jPanel24, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(344, Short.MAX_VALUE))
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel23.TabConstraints.tabTitle"), jPanel23); // NOI18N

            jMenuBar1.setName("jMenuBar1"); // NOI18N

            jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
            jMenu1.setName("jMenu1"); // NOI18N

            jmni_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
            jmni_salir.setIcon(resourceMap.getIcon("jmni_salir.icon")); // NOI18N
            jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
            jmni_salir.setName("jmni_salir"); // NOI18N
            jmni_salir.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_salirActionPerformed(evt);
                }
            });
            jMenu1.add(jmni_salir);

            jMenuBar1.add(jMenu1);

            jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
            jMenu2.setName("jMenu2"); // NOI18N

            jmni_quitarpieza.setText(resourceMap.getString("jmni_quitarpieza.text")); // NOI18N
            jmni_quitarpieza.setName("jmni_quitarpieza"); // NOI18N
            jmni_quitarpieza.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_quitarpiezaActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_quitarpieza);

            jmni_actualizar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, 0));
            jmni_actualizar.setIcon(resourceMap.getIcon("jmni_actualizar.icon")); // NOI18N
            jmni_actualizar.setText(resourceMap.getString("jmni_actualizar.text")); // NOI18N
            jmni_actualizar.setName("jmni_actualizar"); // NOI18N
            jmni_actualizar.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_actualizarActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_actualizar);

            jmni_escape.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
            jmni_escape.setText(resourceMap.getString("jmni_escape.text")); // NOI18N
            jmni_escape.setName("jmni_escape"); // NOI18N
            jmni_escape.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_escapeActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_escape);

            jmni_congelarexistencia.setText(resourceMap.getString("jmni_congelarexistencia.text")); // NOI18N
            jmni_congelarexistencia.setName("jmni_congelarexistencia"); // NOI18N
            jmni_congelarexistencia.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_congelarexistenciaActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_congelarexistencia);

            jmni_subfamilia.setText(resourceMap.getString("jmni_subfamilia.text")); // NOI18N
            jmni_subfamilia.setName("jmni_subfamilia"); // NOI18N
            jmni_subfamilia.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_subfamiliaActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_subfamilia);

            jmni_familia.setText(resourceMap.getString("jmni_familia.text")); // NOI18N
            jmni_familia.setName("jmni_familia"); // NOI18N
            jmni_familia.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_familiaActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_familia);

            jmni_imprimirdifdet.setText(resourceMap.getString("jmni_imprimirdifdet.text")); // NOI18N
            jmni_imprimirdifdet.setName("jmni_imprimirdifdet"); // NOI18N
            jmni_imprimirdifdet.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_imprimirdifdetActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_imprimirdifdet);

            jMenuItem1.setText(resourceMap.getString("jMenuItem1.text")); // NOI18N
            jMenuItem1.setName("jMenuItem1"); // NOI18N
            jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem1ActionPerformed(evt);
                }
            });
            jMenu2.add(jMenuItem1);

            jMenuItem2.setText(resourceMap.getString("jMenuItem2.text")); // NOI18N
            jMenuItem2.setName("jMenuItem2"); // NOI18N
            jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem2ActionPerformed(evt);
                }
            });
            jMenu2.add(jMenuItem2);

            jMenuItem3.setText(resourceMap.getString("jMenuItem3.text")); // NOI18N
            jMenuItem3.setName("jMenuItem3"); // NOI18N
            jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem3ActionPerformed(evt);
                }
            });
            jMenu2.add(jMenuItem3);

            jmni_todosdoctos.setText(resourceMap.getString("jmni_todosdoctos.text")); // NOI18N
            jmni_todosdoctos.setName("jmni_todosdoctos"); // NOI18N
            jmni_todosdoctos.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_todosdoctosActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_todosdoctos);

            jMenuItem4.setText(resourceMap.getString("jMenuItem4.text")); // NOI18N
            jMenuItem4.setName("jMenuItem4"); // NOI18N
            jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem4ActionPerformed(evt);
                }
            });
            jMenu2.add(jMenuItem4);

            jMenuBar1.add(jMenu2);

            jMenu3.setText(resourceMap.getString("jMenu3.text")); // NOI18N
            jMenu3.setName("jMenu3"); // NOI18N
            jMenuBar1.add(jMenu3);

            jmni_utilerias.setText(resourceMap.getString("jmni_utilerias.text")); // NOI18N
            jmni_utilerias.setName("jmni_utilerias"); // NOI18N

            jMenuItem5.setText(resourceMap.getString("jMenuItem5.text")); // NOI18N
            jMenuItem5.setName("jMenuItem5"); // NOI18N
            jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem5ActionPerformed(evt);
                }
            });
            jmni_utilerias.add(jMenuItem5);

            jmni_verinvfis.setText(resourceMap.getString("jmni_verinvfis.text")); // NOI18N
            jmni_verinvfis.setName("jmni_verinvfis"); // NOI18N
            jmni_verinvfis.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_verinvfisActionPerformed(evt);
                }
            });
            jmni_utilerias.add(jmni_verinvfis);

            jMenuItem6.setText(resourceMap.getString("jMenuItem6.text")); // NOI18N
            jMenuItem6.setName("jMenuItem6"); // NOI18N
            jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem6ActionPerformed(evt);
                }
            });
            jmni_utilerias.add(jMenuItem6);

            jMenuBar1.add(jmni_utilerias);

            setJMenuBar(jMenuBar1);

            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 970, Short.MAX_VALUE)
            );
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 674, javax.swing.GroupLayout.PREFERRED_SIZE)
            );

            pack();
        }// </editor-fold>//GEN-END:initComponents

    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
       if(JOptionPane.showConfirmDialog(null, "Realmente Desea Salir?")==0)
           {
               this.dispose();
           }
    }//GEN-LAST:event_jmni_salirActionPerformed

    private void jtf_codelaboraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_codelaboraActionPerformed
        // TODO add your handling code here:
        this.carga_datos_emprealiza(this.jtf_codelabora.getText().trim());
    }//GEN-LAST:event_jtf_codelaboraActionPerformed

    private void jtf_codconfirmaconteoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_codconfirmaconteoActionPerformed
        // TODO add your handling code here:
                this.carga_datos_empsupervisa(this.jtf_codconfirmaconteo.getText().trim());
    }//GEN-LAST:event_jtf_codconfirmaconteoActionPerformed

    private void jtf_descripinventarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_descripinventarioActionPerformed
        // TODO add your handling code here:
        this.jtf_codelabora.requestFocus();
    }//GEN-LAST:event_jtf_descripinventarioActionPerformed

    private void jbtn_crearinvedetalleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_crearinvedetalleActionPerformed
        // TODO add your handling code here:
                           if ((Integer.valueOf(this.jtf_idelabora.getText().toString()) > 0) && (Integer.valueOf(this.jtf_idconfirma.getText().toString()) > 0)&& (this.jtf_descripinventario.getText().length() > 0)) 
                                {
                                    if(JOptionPane.showConfirmDialog(null, "<html><h2>Tienda:"+tien+"<br>Inventario:"+this.jtf_descripinventario.getText()+"<br>Elaboro:"+this.jtf_codelabora.getText()+"<br>Confirmo:"+this.jtf_codconfirmaconteo.getText()+"Desea Crear Inventario?</h2></html>")==0)
                                        {
                                            this.creainventario(ftienda, ffoliopadre,Integer.valueOf(this.jtf_idelabora.getText()),Integer.valueOf(this.jtf_idconfirma.getText()),this.jtf_descripinventario.getText().toUpperCase(),"");
                                            this.jbtn_crearinvedetalle.setVisible(false);
                                            this.jButton3.setVisible(false);
                                        }
                                }
                           else
                                {
                                    JOptionPane.showMessageDialog(null,"Verifique, descripcion,emplado elabora y Empleado supervisa", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
                                    this.jtf_descripinventario.requestFocus();
                                }
                                
                        
    }//GEN-LAST:event_jbtn_crearinvedetalleActionPerformed

    private void jtf_codigoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_codigoActionPerformed
        // TODO add your handling code here:
        String arreglocantidad[]=null;

        if ((this.jtf_codigo.getText().length() > 0) && (this.jtf_folio.getText().length() > 0))
            {
                String cadenacodigo=this.jtf_codigo.getText().replace("*",":");
                arreglocantidad=cadenacodigo.split(":");
                if (arreglocantidad.length==2)
                    {
                        this.jtf_cantidad.setText(arreglocantidad[0]);
                        this.jtf_codigo.setText(arreglocantidad[1]);
                    }
                  this.creainventario_adddetalle(ftienda,Integer.valueOf(this.jtf_folio.getText()),this.jtf_codigo.getText().toUpperCase().trim(),Float.valueOf(this.jtf_cantidad.getText().trim()),this.jtf_codigoinve_observa.getText().toUpperCase().trim());
                  this.jtf_cantidad.setText("1");
                  this.contararticulos();
            }
        else
            {
                JOptionPane.showMessageDialog(null,"<html><h2>Favor de Crear documento o Ingresar clave!!</h2></html>", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
            }
    }//GEN-LAST:event_jtf_codigoActionPerformed

    private void jbtn_importarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_importarActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Importar a  Inventario?")==0)
            {
            String arreglo_importa[]=this.jta_archivo.getText().split("\n");
            String arreglo_codigo[]=null;
            System.out.println("Estos tiene archivo:"+arreglo_importa.length);
             for (int i=0;i<arreglo_importa.length;i++)
                {
                    arreglo_codigo=arreglo_importa[i].split("\t");
                    this.jtf_cantidad.setText(arreglo_codigo[1]);
                    this.jtf_codigo.setText(arreglo_codigo[0]);
                    this.jtf_codigoActionPerformed(evt);
                }
                this.jta_archivo.setText("");
            }
    }//GEN-LAST:event_jbtn_importarActionPerformed

    private void jbtn_congelarexistenciasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_congelarexistenciasActionPerformed
        // TODO add your handling code here:
        if(variables_global.getnivelusu()<3)
        {
         if(JOptionPane.showConfirmDialog(null, "Desea Congelar Existencias?")==0)
            {
                if(Integer.valueOf(this.jtf_idstatus.getText())<3)
                {
                    this.congelar_existencias(ftienda, ffoliopadre,1);
                    this.jbtn_congelarexistencias.setVisible(false);
                }
                else
                {
                  JOptionPane.showMessageDialog(null,"su Inventario ya esta congelado", "Sistema Integral(Inventarios: Modificacion) : Ayuda",1);
                }
            }
        }
        else
            {
                  JOptionPane.showMessageDialog(null,"Comuniquese con Su Administrador!!", "Sistema Integral(Inventarios: Modificacion) : Ayuda",1);
                }
    }//GEN-LAST:event_jbtn_congelarexistenciasActionPerformed

    private void jmni_quitarpiezaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_quitarpiezaActionPerformed
        // TODO add your handling code here:
         String quitaarticulo=JOptionPane.showInputDialog("Ingresa codigo que Deseas Quitar una pieza:");
         this.jtf_codigo.setText(quitaarticulo);
         this.jtf_cantidad.setText("-1");
         this.jtf_codigoActionPerformed(evt);
         this.jtf_cantidad.setText("1");
    }//GEN-LAST:event_jmni_quitarpiezaActionPerformed

    private void jbtn_cerrardoctoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_cerrardoctoActionPerformed
        // TODO add your handling code here:
                if(JOptionPane.showConfirmDialog(null, "<html><h2>Tienda:"+tien+"<br>Inventario:"+this.jtf_descripinventario.getText()+"<br>Elaboro:"+this.jtf_codelabora.getText()+"<br>Confirmo:"+this.jtf_codconfirmaconteo.getText()+"<br>Desea Cerrar?</h2></html>")==0)
                        {
                                this.creainventario_actualiza(ftienda, Integer.valueOf(this.jtf_folio.getText()),1,"");
                                this.carga_datos_catalogo(ftienda, ffoliopadre,0,"");
                                this.jbtn_cerrardocto.setVisible(false);
                                this.LimpiarJTabledetalle();
                                this.jtf_descripinventario.setText("");
                                this.jtf_codelabora.setText("");
                                this.jtf_codconfirmaconteo.setText("");
                                this.jtf_idconfirma.setText("");
                                this.jtf_idelabora.setText("");
                                this.jtf_folio.setText("");
                                this.jbtn_crearinvedetalle.setVisible(false);
                                this.jtf_descripinventario.requestFocus();
                                this.jtf_ultimoprecio.setText("");
                                this.jtf_ultimocodigo.setText("");
                                this.jft_ultimodescripcion.setText("");
                                this.jtf_totalpiezas.setText("");
                                this.jtf_totalarticulos.setText("");
                                this.jbtn_crearinvedetalle.setVisible(true);
                                if (variables_global.getnivelusu()<3)
                                    {
                                        //this.jbtn_autorizarinventario.setVisible(true);
                                    }
                        }
}//GEN-LAST:event_jbtn_cerrardoctoActionPerformed

    private void jbtn_autorizarinventarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_autorizarinventarioActionPerformed
        // TODO add your handling code here:
                if(JOptionPane.showConfirmDialog(null, "<html><h2>Tienda:"+tien+"<br>Inventario:"+this.jtf_descripinventario.getText()+"<br>Elaboro:"+this.jtf_codelabora.getText()+"<br>Confirmo:"+this.jtf_codconfirmaconteo.getText()+"<br>Desea Autorizar?</h2></html>")==0)
                        {
                                this.creainventario_actualiza(ftienda, Integer.valueOf(this.jtf_folio.getText()),2,"");
                                 this.jbtn_autorizarinventario.setVisible(false);
                                 if (variables_global.getnivelusu()<3)
                                    {
                                        this.jbtn_agregarainvecongelado.setVisible(true);
                                    }
                        }
    }//GEN-LAST:event_jbtn_autorizarinventarioActionPerformed

    private void jbtn_agregarainvecongeladoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_agregarainvecongeladoActionPerformed
        // TODO add your handling code here:
            if(JOptionPane.showConfirmDialog(null, "<html><h2>Tienda:"+tien+"<br>Inventario:"+this.jtf_descripinventario.getText()+"<br>Elaboro:"+this.jtf_codelabora.getText()+"<br>Confirmo:"+this.jtf_codconfirmaconteo.getText()+"<br>Desea Integrar a Inventario?</h2></html>")==0)
                        {
                            this.creainventario_aplicar(ftienda,ffoliopadre,Integer.valueOf(this.jtf_folio.getText()));
                            this.jbtn_agregarainvecongelado.setVisible(false);
                        }
    }//GEN-LAST:event_jbtn_agregarainvecongeladoActionPerformed

    private void jbtn_reporteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_reporteActionPerformed
        // TODO add your handling code here:
          // JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
        articulos_sie_invefisico_repdiferencia fifrd=new articulos_sie_invefisico_repdiferencia(ftienda,ffoliopadre);
        fifrd.pack();
        fifrd.setVisible(true);
    }//GEN-LAST:event_jbtn_reporteActionPerformed

    private void jbtn_nuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_nuevoActionPerformed
        // TODO add your handling code here:
 if(JOptionPane.showConfirmDialog(null, "Desea Crear Nuevo Documento?")==0)
        {
        this.LimpiarJTabledetalle();
        this.jtf_descripinventario.setText("");
        this.jtf_codelabora.setText("");
        this.jtf_codconfirmaconteo.setText("");
        this.jtf_idconfirma.setText("");
        this.jtf_idelabora.setText("");
        this.jtf_folio.setText("");
        this.jbtn_crearinvedetalle.setVisible(false);
        this.jtf_descripinventario.requestFocus();
        this.jtf_ultimoprecio.setText("");
        this.jtf_ultimocodigo.setText("");
        this.jft_ultimodescripcion.setText("");
        this.jtf_totalpiezas.setText("");
        this.jtf_totalarticulos.setText("");
        this.jbtn_crearinvedetalle.setVisible(true);
        }
    }//GEN-LAST:event_jbtn_nuevoActionPerformed

    private void jtf_codigoinve_observaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_codigoinve_observaActionPerformed
        // TODO add your handling code here:
        this.jtf_codigo.requestFocus();
    }//GEN-LAST:event_jtf_codigoinve_observaActionPerformed

    private void jmni_actualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_actualizarActionPerformed
        // TODO add your handling code here:
        
        if(indexactual==0)
            {
                this.carga_datos_catalogo(ftienda, ffoliopadre,0,"");
            }
         if(indexactual==1)
            {
               yacargue1=1;
                this.carga_datos_verfameninve(3, ftienda, ffoliopadre, "");
            }
        if (indexactual==2)
            {
               yacargue2=1;
                this.carga_datos_reportediffamilia(1, ftienda, ffoliopadre, "");
            }
        if(indexactual==3)
            {
               yacargue3=1;
                this.carga_datos_reportedifxsub(ftienda, ffoliopadre);
            }
    }//GEN-LAST:event_jmni_actualizarActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
         if(JOptionPane.showConfirmDialog(null, "Desea ver los Articulos?")==0)
            {
                this.carga_datos_verarticuloseninve(ftienda, ffoliopadre,6,"");
            }
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jmni_escapeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_escapeActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_escapeActionPerformed

    private void jTabbedPane1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jTabbedPane1StateChanged
        // TODO add your handling code here:
          indexactual=this.jTabbedPane1.getSelectedIndex();
        if((indexactual==1)&&(yacargue1==0))
            {
               yacargue1=1;
                this.carga_datos_verfameninve(3, ftienda, ffoliopadre, "");
            }
        if( (indexactual==2) && (yacargue2==0) )
            {
               yacargue2=1;
                this.carga_datos_reportediffamilia(1, ftienda, ffoliopadre, "");
            }
          if( (indexactual==3) && (yacargue3==0) )
            {
               yacargue3=1;
                this.carga_datos_reportedifxsub(ftienda, ffoliopadre);
            }

    }//GEN-LAST:event_jTabbedPane1StateChanged

    private void jbtn_cancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_cancelarActionPerformed
        // TODO add your handling code here:
    if(this.jtf_folio.getText().length()>0)
    {
        if(JOptionPane.showConfirmDialog(null, "<html><h2>Tienda:"+tien+"<br>Inventario:"+this.jtf_descripinventario.getText()+"<br>Elaboro:"+this.jtf_codelabora.getText()+"<br>Confirmo:"+this.jtf_codconfirmaconteo.getText()+"Desea Cancelar?</h2></html>")==0)
            {
                this.creainventario_actualiza(ftienda, Integer.valueOf(this.jtf_folio.getText()),3,this.jtf_idinve.getText());
                this.jbtn_autorizarinventario.setVisible(false);
                this.jbtn_cerrardocto.setVisible(false);
                this.jbtn_agregarainvecongelado.setVisible(false);
        }
    }
    }//GEN-LAST:event_jbtn_cancelarActionPerformed

    private void jmni_congelarexistenciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_congelarexistenciaActionPerformed
        // TODO add your handling code here:
        this.jbtn_congelarexistenciasActionPerformed(evt);
}//GEN-LAST:event_jmni_congelarexistenciaActionPerformed

    private void jbtn_invepadreactualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_invepadreactualizarActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Actualizar Inventario?")==0)
                {
                    String arreglo_idstatus[]=this.jcbx_idstatus.getSelectedItem().toString().split(":");
                    //this.inventario_padre_actualiza(1,this.jtf_tienda.getText(),this.jtf_idinve.getText(),arreglo_idstatus[0]);
                }
    }//GEN-LAST:event_jbtn_invepadreactualizarActionPerformed

    private void jrbtn_ambosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_ambosActionPerformed
        // TODO add your handling code here:
           opcionfys=Integer.parseInt(evt.getActionCommand().toString());
           if(this.jtf_subfamactual.getText().toString().length()>0)
            {
            String idcadena[]=this.jtf_subfamactual.getText().split(":");
            this.carga_datos_reportediferencias(ftienda,ffoliopadre,2,idcadena[0]);
           }
    }//GEN-LAST:event_jrbtn_ambosActionPerformed

    private void jrbtn_faltanteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_faltanteActionPerformed
        // TODO add your handling code here:
           opcionfys=Integer.parseInt(evt.getActionCommand().toString());
           if(this.jtf_subfamactual.getText().toString().length()>0)
            {
            String idcadena[]=this.jtf_subfamactual.getText().split(":");
            this.carga_datos_reportediferencias(ftienda,ffoliopadre,2,idcadena[0]);
           }
    }//GEN-LAST:event_jrbtn_faltanteActionPerformed

    private void jrbtn_sobranteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_sobranteActionPerformed
        // TODO add your handling code here:
           opcionfys=Integer.parseInt(evt.getActionCommand().toString());
           if(this.jtf_subfamactual.getText().toString().length()>0)
            {
            String idcadena[]=this.jtf_subfamactual.getText().split(":");
            this.carga_datos_reportediferencias(ftienda,ffoliopadre,2,idcadena[0]);
            }
    }//GEN-LAST:event_jrbtn_sobranteActionPerformed

    private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
        // TODO add your handling code here:
          if(JOptionPane.showConfirmDialog(null, "Deseas Ver Todos los Articulos,esto puede tardar varios minutos?")==0)
                {
                    this.carga_datos_reportediferencias(ftienda,ffoliopadre,0,"");
                }
        
    }//GEN-LAST:event_jCheckBox1ActionPerformed

    private void jmni_subfamiliaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_subfamiliaActionPerformed
        float filas = this.jtable_modelo_subfam2.getRowCount() ;
        float paginas = filas /50;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimirxsub(ni,paginas);
             }
    }//GEN-LAST:event_jmni_subfamiliaActionPerformed

    private void jmni_familiaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_familiaActionPerformed
        float filas = this.jtable_modelo_familia.getRowCount() ;
        float paginas = filas /50;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimirxfam(ni,paginas);

             }
    }//GEN-LAST:event_jmni_familiaActionPerformed

    private void jmni_imprimirdifdetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_imprimirdifdetActionPerformed
        try {
            // TODO add your handling code here:
            this.jtb_catalogo_articulos.print();
        } catch (PrinterException ex) {
            Logger.getLogger(articulos_sie_invefisicodetalle.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jmni_imprimirdifdetActionPerformed

    private void jtf_operosobfolActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_operosobfolActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_operosobfolActionPerformed

    private void jcb_verfotos1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcb_verfotos1ActionPerformed
        // TODO add your handling code here:
        if(Integer.valueOf(this.jtf_operosobfol.getText().toString())>0) {
            articulos_sie_almacen_movi_extras_detalle fasamed=new articulos_sie_almacen_movi_extras_detalle(this.jtf_operosobfol.getText().toString(),this.jtf_tienda.getText());
            fasamed.pack();
            fasamed.setVisible(true);
        }
}//GEN-LAST:event_jcb_verfotos1ActionPerformed

    private void jtf_operofalfolActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_operofalfolActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_operofalfolActionPerformed

    private void jcb_verfotos2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcb_verfotos2ActionPerformed
        // TODO add your handling code here:
        if(Integer.valueOf(this.jtf_operofalfol.getText().toString())>0) {
            articulos_sie_almacen_movi_extras_detalle fasamed=new articulos_sie_almacen_movi_extras_detalle(this.jtf_operofalfol.getText().toString(),this.jtf_tienda.getText());
            fasamed.pack();
            fasamed.setVisible(true);
        }
}//GEN-LAST:event_jcb_verfotos2ActionPerformed

    private void jbtn_agregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_agregarActionPerformed
        // TODO add your handling code here:
        if((Integer.valueOf(this.jtf_operosobfol.getText())==0) || (Integer.valueOf(this.jtf_operofalfol.getText())==0))
            {
                if(JOptionPane.showConfirmDialog(null, "<html><h2><b>Desea Preparar sus Articulos para generar Mov de Entradas y Salidas por Inv. Fisico?</b></h2></html>")==0)
                    {
                        this.carga_datos_reportediferencias(ftienda,ffoliopadre,0,"");
                        //this.tabla_articulos_exportar();
                        this.jTabbedPane1.setSelectedIndex(4);
                    }
        }
        else
                {
                  JOptionPane.showMessageDialog(null,"su Inventario ya Tiende Documentos de Entrada y Salida", "Sistema Integral(Inventarios: Modificacion) : Ayuda",1);
                }

    }//GEN-LAST:event_jbtn_agregarActionPerformed

    private void jbtn_genramovextsalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_genramovextsalActionPerformed
        // TODO add your handling code here:
if(JOptionPane.showConfirmDialog(null, "<html><h2><b>Desea aplicar Inventario, este Proceso puede tardar Varios Minutos?<br>Articulos Sobrantes y Correctos"+this.jtf_importefal2.getText()+"<br>Articulos Con Faltantes"+this.jtf_importefal1.getText()+"</b></h2></html>")==0)
           {
              java.util.Vector arreglodesobrantes=this.jtable_modelo_sobrante.getDataVector();
                        String articulos_sobrantes=arreglodesobrantes.toString();
                        articulos_sobrantes=articulos_sobrantes.replace('[','{');
                        articulos_sobrantes=articulos_sobrantes.replace(']','}');


        String textodif="",foliosob="";
        if((this.jtable_modelo_sobrante.getRowCount()>0) && (Integer.valueOf(this.jtf_operosobfol.getText())==0))
                            {
                                    try
                                        {
                                            textodif="select insercion_requisicion_producto_movimientos_extras('"+this.find_esquema(this.jtf_tienda.getText().toString())+"',7,'Ent Inventario Fis','"+articulos_sobrantes+"','Folio Recepcion:"+this.jtf_idinve.getText().toString()+"',"+this.jtf_importesob.getText()+",0) ;";
                                            System.out.println(textodif);
                                            rs = x.sieuno_executediversosv2(textodif,variables_global.getconexiongral());
                                            while (rs.next())
                                                {
                                                    foliosob=rs.getString(1);

                                                }
                                        }
                                        catch(Exception e)
                                                {
                                                    System.out.println(e.getMessage());
                                                }
                                    this.jtf_operosobfol.setText(String.valueOf(foliosob));
                                    this.inventario_padre_actualiza(2,this.jtf_tienda.getText(),this.jtf_idinve.getText(),foliosob);


                            }

                        String foliofal="";
                         for(int i = 0 ;i < this.jtable_modelo_faltante.getRowCount(); i++)
                            {
                                jtable_modelo_faltante.setValueAt(".",i ,2);
                            }
                        java.util.Vector arreglodefaltantes=this.jtable_modelo_faltante.getDataVector();
                        String articulos_faltantes=arreglodefaltantes.toString();
                        articulos_faltantes=articulos_faltantes.replace('[','{');
                        articulos_faltantes=articulos_faltantes.replace(']','}');
         if((this.jtable_modelo_faltante.getRowCount()>0)  && (Integer.valueOf(this.jtf_operofalfol.getText())==0))
                            {
                                try
                                       {
                                            textodif="select insercion_requisicion_producto_movimientos_extras('"+this.find_esquema(this.jtf_tienda.getText().toString())+"',7,'Sal Inv fisico','"+articulos_faltantes+"','Folio Inventario:"+this.jtf_idinve.getText().toString()+"',"+this.jtf_importefal.getText()+",0) ;";
                                            System.out.println(textodif);
                                            rs = x.sieuno_executediversosv2(textodif,variables_global.getconexiongral());
                                            while (rs.next())
                                                {
                                                        foliofal=rs.getString(1);
                                                }
                                        }
                                        catch(Exception e)
                                        {
                                                System.out.println(e.getMessage());
                                        }
                                this.jtf_operofalfol.setText(String.valueOf(foliofal));
                                 this.inventario_padre_actualiza(3,this.jtf_tienda.getText(),this.jtf_idinve.getText(),foliofal);
                                }
        JOptionPane.showMessageDialog(null,"Gracias Documentos Creados Correctamente!", "Sistema Integral(Inventarios: Modificacion) : Ayuda",1);
    }
}//GEN-LAST:event_jbtn_genramovextsalActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        float filas = this.jtable_modelo2.getRowCount() ;
        float paginas = filas /50;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimir(ni,paginas);
             }
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        float filas = this.jtable_modelo_subfam2.getRowCount() ;
        float paginas = filas /50;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimirxsubrep(ni,paginas);
             }
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
        float filas = this.jtable_modelo_catalogo.getRowCount() ;
        float paginas = filas/35;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimir_resudoc(ni,paginas);
             }
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        float filas = this.jtable_modelo.getRowCount() ;
        float paginas = filas /50;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimirdoctodet(ni,paginas);
             }
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jtf_inveclave1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_inveclave1ActionPerformed
        // TODO add your handling code here:
    this.find_textoenjtable(0, 0, this.jtf_inveclave1.getText().toUpperCase().trim());
    }//GEN-LAST:event_jtf_inveclave1ActionPerformed

    private void jtf_inveclave2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_inveclave2ActionPerformed
        // TODO add your handling code here:
        this.find_textoenjtable2(2, 0, this.jtf_inveclave2.getText().toUpperCase().trim());
    }//GEN-LAST:event_jtf_inveclave2ActionPerformed

    private void jbtn_genramovextsal1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_genramovextsal1ActionPerformed
        // TODO add your handling code here:
 if(Integer.valueOf(this.jtf_idstatus.getText())<7)
                {
        if(JOptionPane.showConfirmDialog(null, "<html><h2><b>Desea aplicar Inventario, este Proceso puede tardar Varios Minutos?<br>Articulos Sobrantes y Correctos"+this.jtf_importefal2.getText()+"<br>Articulos Con Faltantes"+this.jtf_importefal1.getText()+"</b></h2></html>")==0)
           {
             
        String textodif="",foliosob="",foliofal="";
        int ret=0;
        if((Integer.valueOf(this.jtf_operosobfol.getText())>0) || (Integer.valueOf(this.jtf_operofalfol.getText())>0))
                            {
                                    try
                                        {
                                            textodif="select x1sieuno_articulo_inven_aplicardiferencias(1,"+this.jtf_tienda.getText()+","+this.jtf_idinve.getText()+",0,'fecha',"+this.jtf_operosobfol.getText()+","+this.jtf_operofalfol.getText()+",'{{110102}}','Ent Inventario Fis Directo','sal Inventario Fis Directo') ;";
                                            System.out.println(textodif);
                                            rs = x.sieuno_executediversosv2(textodif,variables_global.getconexiongral());
                                            while (rs.next())
                                                {
                                                    ret=rs.getInt(1);


                                                }
                                        }
                                        catch(Exception e)
                                                {
                                                    System.out.println(e.getMessage());
                                                }
                                    if (ret==1)
                                        {
                                            JOptionPane.showMessageDialog(null,"Gracias! Inventario Aplicado", "Sistema Integral(Inventarios: Cierre) : Ayuda",1);
                                        }
                                    else
                                        {
                                            JOptionPane.showMessageDialog(null,"Error Inventario Aplicado!", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
                                        }
                                   


                            }
         
        JOptionPane.showMessageDialog(null,"Gracias Inventario Aplicado Directamente!", "Sistema Integral(Inventarios: Modificacion) : Ayuda",1);
        }
    }
  else
                {
                  JOptionPane.showMessageDialog(null,"su Inventario ya esta Aplicado", "Sistema Integral(Inventarios: Modificacion) : Ayuda",1);
                }
    }//GEN-LAST:event_jbtn_genramovextsal1ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
        if(variables_global.getnivelusu()<3)
        {
         if(JOptionPane.showConfirmDialog(null, "Verificar Costos de Inventario?")==0)
            {

                    this.congelar_existencias(ftienda, ffoliopadre,2);
                    this.jbtn_congelarexistencias.setVisible(false);

            }
        }
        else
            {
                  JOptionPane.showMessageDialog(null,"Comuniquese con Su Administrador!!", "Sistema Integral(Inventarios: Modificacion) : Ayuda",1);
                }
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jbtn_imprimirteoricoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_imprimirteoricoActionPerformed
        // TODO add your handling code here:
        float filas = this.jtable_modelo_Articeninve.getRowCount() ;
        float paginas = filas /50;
        int ni=0;
        if((this.jtf_pagini.getText().equals("-1")) && (this.jtf_pagini.getText().equals("-1")))
        {
            if(JOptionPane.showConfirmDialog(null, "Desea Imprimir Todas Las Paginas?")==0)
            {
            for(ni=0;ni<paginas;ni++)
                 {
                     this.imprimirinventario(ni,paginas);
                     System.out.println("Imprimir todo");
                 }
             }
        }
        else
        {
            for(ni=(Integer.valueOf(this.jtf_pagini.getText())-1);ni<Integer.valueOf(this.jtf_pagfin.getText());ni++)
             {
                 this.imprimirinventario(ni,paginas);
                System.out.println("Imprimir lo que quiero");
             }
        }
    }//GEN-LAST:event_jbtn_imprimirteoricoActionPerformed

    private void jmni_todosdoctosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_todosdoctosActionPerformed
        // TODO add your handling code here:
        this.carga_datos_catalogo(ftienda, ffoliopadre,3,"");
}//GEN-LAST:event_jmni_todosdoctosActionPerformed

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        // TODO add your handling code here:
        String texto=JOptionPane.showInputDialog("Ingresa Fecha(dd-mm-aaaa):");
        String fechaa=this.fechaamericana(texto.trim().replace("/", "-"));
        this.carga_datos_catalogo(ftienda, ffoliopadre,4,fechaa);

    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void jtf_paginiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_paginiActionPerformed
        // TODO add your handling code here:
        this.jtf_pagfin.selectAll();
        this.jtf_pagfin.requestFocus();
    }//GEN-LAST:event_jtf_paginiActionPerformed

    private void jtf_pagfinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_pagfinActionPerformed
        // TODO add your handling code here:
        this.jbtn_imprimirteoricoActionPerformed(evt);
    }//GEN-LAST:event_jtf_pagfinActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
         if(JOptionPane.showConfirmDialog(null, "Desea Generar Archivo esto Puede Tardar unos Minutos?")==0)
             {

                this.exportar_archivoxtienda();
             }
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
        // TODO add your handling code here:
        if(variables_global.getnivelusu()<3)
        {
         if(JOptionPane.showConfirmDialog(null, "Desea Enviar los Articulos almacen?")==0)
            {
                int resultado=0;
                String texto="select * from x1sieuno_addarticulov3(4,'"+ffoliopadre+"','','',0,0,0,0,'',0,"+ftienda+",'');";
                System.out.println(texto);
                try
                    {
                        rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                        while (rs.next())
                            {
                                resultado=rs.getInt(1);
                            }
                    }
                catch(Exception e)
                        {
                            System.out.println(e.getMessage());
                        }
                if (resultado==1)
                        {
                            this.jtf_idstatus.setText("3");
                            JOptionPane.showMessageDialog(null,"Gracias Inventario congelado","Sistema Integral(Inventarios: Alta) : Ayuda",1);
                        }
                if (resultado==2)
                        {
                            JOptionPane.showMessageDialog(null,"Error Inventario ya esta Congelado","Sistema Integral(Inventarios: Alta) : Ayuda",1);
                        }
         }
        }
    }//GEN-LAST:event_jMenuItem5ActionPerformed

    private void jmni_verinvfisActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_verinvfisActionPerformed
        // TODO add your handling code here:
        this.carga_datos_verarticuloseninve(ftienda, ffoliopadre,7,"");
    }//GEN-LAST:event_jmni_verinvfisActionPerformed

    private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "<html><h2><b>Desea Preparar sus Articulos para generar Mov de Entradas y Salidas por Inv. Fisico?</b></h2></html>")==0)
                    {
                        this.carga_datos_reportediferencias(ftienda,ffoliopadre,8,"");
                        //this.tabla_articulos_exportar();
                        this.jTabbedPane1.setSelectedIndex(4);
                    }
    }//GEN-LAST:event_jMenuItem6ActionPerformed

    private void jdc_fechainicialKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jdc_fechainicialKeyPressed
        // TODO add your handling code here:
}//GEN-LAST:event_jdc_fechainicialKeyPressed

    private void jbtn_generarreporteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_generarreporteActionPerformed
        // TODO add your handling code here:
 if(JOptionPane.showConfirmDialog(null, "<html><h2><b>Desea Generar Reporte?</b></h2></html>")==0)
        {
        while(jtable_modelo_estadistica.getRowCount()>0)jtable_modelo_estadistica.removeRow(0);
       //voy por el detalle del documento
       float cantidad=0;
       DecimalFormat miformat = new DecimalFormat("############.##");
        Object[] fnewRow = new Object[3];
            try
                {
                    rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_det_estadistica("+ftienda+","+ffoliopadre+",0,'"+this.fechaamericana(this.jdc_fechainicial.getDate())+"','"+this.fechaamericana(this.jdc_fechafinal.getDate())+"','','','') as (id integer,can numeric);",variables_global.getconexiongral());
                    while (rs.next())
                        {
                            cantidad+=rs.getFloat("can");
                            fnewRow[0]=rs.getString("id");
                            fnewRow[1]=rs.getString("can");
                            fnewRow[2]="";
                            jtable_modelo_estadistica.addRow(fnewRow);
                        }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
                            fnewRow[0]="Total";
                            fnewRow[1]=miformat.format(cantidad);
                            fnewRow[1]="";
                            jtable_modelo_estadistica.addRow(fnewRow);
    }
}//GEN-LAST:event_jbtn_generarreporteActionPerformed

    private void jbtn_generarreporte1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_generarreporte1ActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "<html><h2><b>Desea Generar Reporte?</b></h2></html>")==0)
        {
        while(jtable_modelo_estadistica.getRowCount()>0)jtable_modelo_estadistica.removeRow(0);
       //voy por el detalle del documento
       float cantidad=0;
       DecimalFormat miformat = new DecimalFormat("############.##");
        Object[] fnewRow = new Object[3];
            try
                {
                    rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_det_estadistica("+ftienda+","+ffoliopadre+",1,'"+this.fechaamericana(this.jdc_fechainicial.getDate())+"','"+this.fechaamericana(this.jdc_fechafinal.getDate())+"','','','') as (id character varying(16),can numeric);",variables_global.getconexiongral());
                    while (rs.next())
                        {
                            cantidad+=rs.getFloat("can");
                            fnewRow[0]=rs.getString("id");
                            fnewRow[1]=rs.getString("can");
                            fnewRow[2]="";
                            jtable_modelo_estadistica.addRow(fnewRow);
                        }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
                            fnewRow[0]="Total";
                            fnewRow[1]=miformat.format(cantidad);
                            fnewRow[2]="";
                            jtable_modelo_estadistica.addRow(fnewRow);
    }
    }//GEN-LAST:event_jbtn_generarreporte1ActionPerformed

    private void jbtn_generarreporte2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_generarreporte2ActionPerformed
        // TODO add your handling code here:
    if(JOptionPane.showConfirmDialog(null, "<html><h2><b>Desea Generar Reporte General?</b></h2></html>")==0)
        {
        while(jtable_modelo_estadistica.getRowCount()>0)jtable_modelo_estadistica.removeRow(0);
       //voy por el detalle del documento
       float cantidad=0;
       DecimalFormat miformat = new DecimalFormat("############.##");
        Object[] fnewRow = new Object[3];
            try
                {
                    rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_det_estadistica("+ftienda+","+ffoliopadre+",2,'"+this.fechaamericana(this.jdc_fechainicial.getDate())+"','"+this.fechaamericana(this.jdc_fechafinal.getDate())+"','','','') as (id character varying(16),can numeric,titulo text);",variables_global.getconexiongral());
                    while (rs.next())
                        {
                            cantidad+=rs.getFloat("can");
                            fnewRow[0]=rs.getString("id");
                            fnewRow[1]=rs.getString("can");
                            fnewRow[2]=rs.getString("titulo");
                            jtable_modelo_estadistica.addRow(fnewRow);
                        }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
                            fnewRow[0]="Total";
                            fnewRow[1]=miformat.format(cantidad);
                            fnewRow[2]="";
                            jtable_modelo_estadistica.addRow(fnewRow);
    }
    }//GEN-LAST:event_jbtn_generarreporte2ActionPerformed

    private void jbtn_generarreporte3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_generarreporte3ActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "<html><h2><b>Desea Generar Reporte General?</b></h2></html>")==0)
        {
        while(jtable_modelo_estadistica.getRowCount()>0)jtable_modelo_estadistica.removeRow(0);
       //voy por el detalle del documento
       float cantidad=0;
       DecimalFormat miformat = new DecimalFormat("############.##");
        Object[] fnewRow = new Object[3];
            try
                {
                    rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_det_estadistica("+ftienda+","+ffoliopadre+",3,'"+this.fechaamericana(this.jdc_fechainicial.getDate())+"','"+this.fechaamericana(this.jdc_fechafinal.getDate())+"','','','') as (id integer,can numeric,precio numeric);",variables_global.getconexiongral());
                    while (rs.next())
                        {
                            cantidad+=rs.getFloat("can");
                            fnewRow[0]=rs.getString("id");
                            fnewRow[1]=rs.getString("can");
                            fnewRow[2]=rs.getString("precio");
                            jtable_modelo_estadistica.addRow(fnewRow);
                        }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
                            fnewRow[0]="Total";
                            fnewRow[1]=miformat.format(cantidad);
                            fnewRow[2]="";
                            jtable_modelo_estadistica.addRow(fnewRow);
    }
    }//GEN-LAST:event_jbtn_generarreporte3ActionPerformed
    private void jt_inventariofisicodetalleMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
         private void jt_repsubfamMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    private void jt_eninvefamiliaMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    private void jt_eninvesfamiliaMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
private void jt_repfamiliaMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
private void jt_catainventariosMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
 private void jt_sobrantesMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
  private void jt_faltantesMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    private void jt_repsubfam1MouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
        private void jtb_catalogo_articulos1MouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    private void jt_repsubfamhistorialMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }


/**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                articulos_sie_invefisicodetalle dialog = new articulos_sie_invefisicodetalle();
                //dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                  //  public void windowClosing(java.awt.event.WindowEvent e) {
                    //    System.exit(0);
                    //}
                //});
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane15;
    private javax.swing.JScrollPane jScrollPane16;
    private javax.swing.JScrollPane jScrollPane17;
    private javax.swing.JScrollPane jScrollPane18;
    private javax.swing.JScrollPane jScrollPane19;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JButton jbtn_agregar;
    private javax.swing.JButton jbtn_agregarainvecongelado;
    private javax.swing.JButton jbtn_autorizarinventario;
    private javax.swing.JButton jbtn_cancelar;
    private javax.swing.JButton jbtn_cerrardocto;
    private javax.swing.JButton jbtn_congelarexistencias;
    private javax.swing.JButton jbtn_crearinvedetalle;
    private javax.swing.JButton jbtn_generarreporte;
    private javax.swing.JButton jbtn_generarreporte1;
    private javax.swing.JButton jbtn_generarreporte2;
    private javax.swing.JButton jbtn_generarreporte3;
    private javax.swing.JButton jbtn_genramovextsal;
    private javax.swing.JButton jbtn_genramovextsal1;
    private javax.swing.JButton jbtn_importar;
    private javax.swing.JButton jbtn_imprimirteorico;
    private javax.swing.JButton jbtn_invepadreactualizar;
    private javax.swing.JButton jbtn_nuevo;
    private javax.swing.JButton jbtn_reporte;
    private javax.swing.JCheckBox jcb_verfotos1;
    private javax.swing.JCheckBox jcb_verfotos2;
    private javax.swing.JComboBox jcbx_idstatus;
    private com.toedter.calendar.JDateChooser jdc_fechafinal;
    private com.toedter.calendar.JDateChooser jdc_fechainicial;
    private javax.swing.JEditorPane jep_articuloimagen;
    private javax.swing.JEditorPane jep_articuloimagen1;
    private javax.swing.JTextField jft_ultimodescripcion;
    private javax.swing.JLabel jlbl_historial;
    private javax.swing.JMenuItem jmni_actualizar;
    private javax.swing.JMenuItem jmni_congelarexistencia;
    private javax.swing.JMenuItem jmni_escape;
    private javax.swing.JMenuItem jmni_familia;
    private javax.swing.JMenuItem jmni_imprimirdifdet;
    private javax.swing.JMenuItem jmni_quitarpieza;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JMenuItem jmni_subfamilia;
    private javax.swing.JMenuItem jmni_todosdoctos;
    private javax.swing.JMenu jmni_utilerias;
    private javax.swing.JMenuItem jmni_verinvfis;
    private javax.swing.JRadioButton jrbtn_ambos;
    private javax.swing.JRadioButton jrbtn_faltante;
    private javax.swing.JRadioButton jrbtn_sobrante;
    private javax.swing.JTable jt_articuloseninve;
    private javax.swing.JTable jt_catainventarios;
    private javax.swing.JTable jt_eninvefamilia;
    private javax.swing.JTable jt_eninvesfamilia;
    private javax.swing.JTable jt_faltantes;
    private javax.swing.JTable jt_inventariofisicodetalle;
    private javax.swing.JTable jt_repfamilia;
    private javax.swing.JTable jt_repsubfam;
    private javax.swing.JTable jt_repsubfam1;
    private javax.swing.JTable jt_repsubfam2;
    private javax.swing.JTable jt_repsubfamhistorial;
    private javax.swing.JTable jt_sobrantes;
    private javax.swing.JTextArea jta_archivo;
    private javax.swing.JTable jtb_catalogo_articulos;
    private javax.swing.JTable jtb_catalogo_articulos1;
    private javax.swing.JTable jtb_catalogo_historialfisico;
    private javax.swing.JTable jtbl_kardex1;
    private javax.swing.JTextField jtf_articuloscantidad;
    private javax.swing.JTextField jtf_articuloscantidad1;
    private javax.swing.JTextField jtf_articuloscantidadf;
    private javax.swing.JTextField jtf_canactual;
    private javax.swing.JTextField jtf_cananterior;
    private javax.swing.JTextField jtf_cantidad;
    private javax.swing.JTextField jtf_codconfirmaconteo;
    private javax.swing.JTextField jtf_codelabora;
    private javax.swing.JTextField jtf_codigo;
    private javax.swing.JTextField jtf_codigoinve_observa;
    private javax.swing.JTextField jtf_deletefila;
    private javax.swing.JTextField jtf_deletefila1;
    private javax.swing.JTextField jtf_describsubhis;
    private javax.swing.JTextField jtf_descripinventario;
    private javax.swing.JTextField jtf_fecha;
    private javax.swing.JTextField jtf_fecharevisa;
    private javax.swing.JTextField jtf_folio;
    private javax.swing.JTextField jtf_horainicio;
    private javax.swing.JTextField jtf_idconfirma;
    private javax.swing.JTextField jtf_idelabora;
    private javax.swing.JTextField jtf_idinve;
    private javax.swing.JTextField jtf_idstatus;
    private javax.swing.JTextField jtf_ifcosto;
    private javax.swing.JTextField jtf_ifprecio;
    private javax.swing.JTextField jtf_importefal;
    private javax.swing.JTextField jtf_importefal1;
    private javax.swing.JTextField jtf_importefal2;
    private javax.swing.JTextField jtf_importefal3;
    private javax.swing.JTextField jtf_importefal4;
    private javax.swing.JTextField jtf_importesob;
    private javax.swing.JTextField jtf_inveactualfecha;
    private javax.swing.JTextField jtf_inveactualstatus;
    private javax.swing.JTextField jtf_invearticulo;
    private javax.swing.JTextField jtf_inveclave;
    private javax.swing.JTextField jtf_inveclave1;
    private javax.swing.JTextField jtf_inveclave2;
    private javax.swing.JTextField jtf_invepadredescripcion;
    private javax.swing.JTextField jtf_invepadrefecha;
    private javax.swing.JTextField jtf_invepadrefecha1;
    private javax.swing.JTextField jtf_operofalfol;
    private javax.swing.JTextField jtf_operosobfol;
    private javax.swing.JTextField jtf_pagfin;
    private javax.swing.JTextField jtf_pagini;
    private javax.swing.JTextField jtf_subfamactual;
    private javax.swing.JTextField jtf_tienda;
    private javax.swing.JTextField jtf_totalarticulos;
    private javax.swing.JTextField jtf_totalpiezas;
    private javax.swing.JTextField jtf_ultimocodigo;
    private javax.swing.JTextField jtf_ultimoprecio;
    private javax.swing.JTextField jtf_ultimoprecioreb;
    // End of variables declaration//GEN-END:variables
private articulos_sie_invefisico_imprimir objimpresora;
}
